From fbbfc59e3c70f88981339b3708ca41bf4d1aff89 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 14 Jan 2025 19:59:33 +0000 Subject: [PATCH 1/2] chore: Remove empty dotnet configuration PiperOrigin-RevId: 715418090 Source-Link: https://github.com/googleapis/googleapis/commit/34d78f08e32be18b731c5065b67758ff8a0e8db7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/51204697467229f3ec29a19deb0c18d6e75d269b Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFjYXRhbG9nLy5Pd2xCb3QueWFtbCIsImgiOiI1MTIwNDY5NzQ2NzIyOWYzZWMyOWExOWRlYjBjMThkNmU3NWQyNjliIn0= --- .../google-cloud-datacatalog/v1/.eslintignore | 7 + .../v1/.eslintrc.json | 3 + .../google-cloud-datacatalog/v1/.gitignore | 14 + .../google-cloud-datacatalog/v1/.jsdoc.js | 55 + .../google-cloud-datacatalog/v1/.mocharc.js | 33 + .../v1/.prettierrc.js | 22 + .../google-cloud-datacatalog/v1/README.md | 1 + .../google-cloud-datacatalog/v1/package.json | 60 + .../cloud/datacatalog/v1/bigquery.proto | 81 + .../google/cloud/datacatalog/v1/common.proto | 81 + .../cloud/datacatalog/v1/data_source.proto | 86 + .../cloud/datacatalog/v1/datacatalog.proto | 2412 + .../cloud/datacatalog/v1/dataplex_spec.proto | 89 + .../cloud/datacatalog/v1/dump_content.proto | 55 + .../datacatalog/v1/gcs_fileset_spec.proto | 80 + .../datacatalog/v1/physical_schema.proto | 76 + .../datacatalog/v1/policytagmanager.proto | 506 + .../v1/policytagmanagerserialization.proto | 229 + .../google/cloud/datacatalog/v1/schema.proto | 148 + .../google/cloud/datacatalog/v1/search.proto | 119 + .../cloud/datacatalog/v1/table_spec.proto | 114 + .../google/cloud/datacatalog/v1/tags.proto | 307 + .../cloud/datacatalog/v1/timestamps.proto | 48 + .../google/cloud/datacatalog/v1/usage.proto | 83 + .../v1/protos/protos.d.ts | 25619 +++++++ .../v1/protos/protos.js | 63902 ++++++++++++++++ .../v1/protos/protos.json | 6607 ++ .../generated/v1/data_catalog.create_entry.js | 76 + .../v1/data_catalog.create_entry_group.js | 76 + .../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 + .../v1/data_catalog.import_entries.js | 71 + .../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 | 103 + .../v1/data_catalog.modify_entry_contacts.js | 66 + .../v1/data_catalog.modify_entry_overview.js | 66 + .../v1/data_catalog.reconcile_tags.js | 80 + .../data_catalog.rename_tag_template_field.js | 67 + ...og.rename_tag_template_field_enum_value.js | 67 + .../v1/data_catalog.retrieve_config.js | 61 + .../data_catalog.retrieve_effective_config.js | 61 + .../v1/data_catalog.search_catalog.js | 118 + .../generated/v1/data_catalog.set_config.js | 69 + .../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 | 79 + .../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 | 72 + ...manager_serialization.import_taxonomies.js | 70 + ..._manager_serialization.replace_taxonomy.js | 66 + ..._metadata_google.cloud.datacatalog.v1.json | 2407 + .../google-cloud-datacatalog/v1/src/index.ts | 29 + .../v1/src/v1/data_catalog_client.ts | 4651 ++ .../v1/src/v1/data_catalog_client_config.json | 216 + .../v1/src/v1/data_catalog_proto_list.json | 18 + .../v1/src/v1/gapic_metadata.json | 605 + .../v1/src/v1/index.ts | 21 + .../v1/src/v1/policy_tag_manager_client.ts | 2055 + .../v1/policy_tag_manager_client_config.json | 91 + .../src/v1/policy_tag_manager_proto_list.json | 18 + ...policy_tag_manager_serialization_client.ts | 1085 + ...g_manager_serialization_client_config.json | 41 + ..._tag_manager_serialization_proto_list.json | 18 + .../system-test/fixtures/sample/src/index.js | 29 + .../system-test/fixtures/sample/src/index.ts | 44 + .../v1/system-test/install.ts | 49 + .../v1/test/gapic_data_catalog_v1.ts | 5321 ++ ...pic_policy_tag_manager_serialization_v1.ts | 971 + .../v1/test/gapic_policy_tag_manager_v1.ts | 2380 + .../google-cloud-datacatalog/v1/tsconfig.json | 19 + .../v1/webpack.config.js | 64 + .../v1beta1/.eslintignore | 7 + .../v1beta1/.eslintrc.json | 3 + .../v1beta1/.gitignore | 14 + .../v1beta1/.jsdoc.js | 55 + .../v1beta1/.mocharc.js | 33 + .../v1beta1/.prettierrc.js | 22 + .../v1beta1/README.md | 1 + .../v1beta1/package.json | 60 + .../cloud/datacatalog/v1beta1/common.proto | 50 + .../datacatalog/v1beta1/datacatalog.proto | 1315 + .../v1beta1/gcs_fileset_spec.proto | 78 + .../v1beta1/policytagmanager.proto | 452 + .../policytagmanagerserialization.proto | 169 + .../cloud/datacatalog/v1beta1/schema.proto | 55 + .../cloud/datacatalog/v1beta1/search.proto | 73 + .../datacatalog/v1beta1/table_spec.proto | 105 + .../cloud/datacatalog/v1beta1/tags.proto | 250 + .../datacatalog/v1beta1/timestamps.proto | 41 + .../cloud/datacatalog/v1beta1/usage.proto | 59 + .../v1beta1/protos/protos.d.ts | 17208 +++++ .../v1beta1/protos/protos.js | 43311 +++++++++++ .../v1beta1/protos/protos.json | 4750 ++ .../v1beta1/data_catalog.create_entry.js | 74 + .../data_catalog.create_entry_group.js | 75 + .../v1beta1/data_catalog.create_tag.js | 71 + .../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 | 68 + ...og.rename_tag_template_field_enum_value.js | 68 + .../v1beta1/data_catalog.search_catalog.js | 103 + .../v1beta1/data_catalog.set_iam_policy.js | 77 + .../data_catalog.test_iam_permissions.js | 70 + .../v1beta1/data_catalog.update_entry.js | 85 + .../data_catalog.update_entry_group.js | 68 + .../v1beta1/data_catalog.update_tag.js | 70 + .../data_catalog.update_tag_template.js | 69 + .../data_catalog.update_tag_template_field.js | 83 + .../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 | 78 + .../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 | 1947 + .../v1beta1/src/index.ts | 29 + .../src/v1beta1/data_catalog_client.ts | 3761 + .../v1beta1/data_catalog_client_config.json | 171 + .../src/v1beta1/data_catalog_proto_list.json | 13 + .../v1beta1/src/v1beta1/gapic_metadata.json | 505 + .../v1beta1/src/v1beta1/index.ts | 21 + .../src/v1beta1/policy_tag_manager_client.ts | 2024 + .../policy_tag_manager_client_config.json | 91 + .../policy_tag_manager_proto_list.json | 13 + ...policy_tag_manager_serialization_client.ts | 991 + ...g_manager_serialization_client_config.json | 36 + ..._tag_manager_serialization_proto_list.json | 13 + .../system-test/fixtures/sample/src/index.js | 29 + .../system-test/fixtures/sample/src/index.ts | 44 + .../v1beta1/system-test/install.ts | 49 + .../test/gapic_data_catalog_v1beta1.ts | 4241 + ...olicy_tag_manager_serialization_v1beta1.ts | 863 + .../test/gapic_policy_tag_manager_v1beta1.ts | 2380 + .../v1beta1/tsconfig.json | 19 + .../v1beta1/webpack.config.js | 64 + 187 files changed, 213173 insertions(+) create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/.eslintignore create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/.eslintrc.json create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/.jsdoc.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/.mocharc.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/.prettierrc.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/README.md create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/package.json create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/bigquery.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/common.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/data_source.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/datacatalog.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/dataplex_spec.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/dump_content.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/gcs_fileset_spec.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/physical_schema.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/policytagmanager.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/policytagmanagerserialization.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/schema.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/search.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/table_spec.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/tags.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/timestamps.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/usage.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/protos.d.ts create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/protos.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/protos.json create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_entry.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_entry_group.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_tag.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_tag_template.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_tag_template_field.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_entry.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_entry_group.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_tag.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_tag_template.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_tag_template_field.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_entry.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_entry_group.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_iam_policy.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_tag_template.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.import_entries.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.list_entries.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.list_entry_groups.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.list_tags.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.lookup_entry.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.modify_entry_contacts.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.modify_entry_overview.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.reconcile_tags.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.rename_tag_template_field.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.rename_tag_template_field_enum_value.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.retrieve_config.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.retrieve_effective_config.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.search_catalog.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.set_config.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.set_iam_policy.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.star_entry.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.test_iam_permissions.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.unstar_entry.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_entry.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_entry_group.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_tag.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_tag_template.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_tag_template_field.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.create_policy_tag.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.create_taxonomy.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.delete_policy_tag.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.delete_taxonomy.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.get_iam_policy.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.get_policy_tag.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.get_taxonomy.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.list_policy_tags.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.list_taxonomies.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.set_iam_policy.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.test_iam_permissions.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.update_policy_tag.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.update_taxonomy.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager_serialization.export_taxonomies.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager_serialization.import_taxonomies.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager_serialization.replace_taxonomy.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.v1.json create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/src/index.ts create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/src/v1/data_catalog_client.ts create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/src/v1/data_catalog_client_config.json create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/src/v1/data_catalog_proto_list.json create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/src/v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/src/v1/index.ts create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_client.ts create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_client_config.json create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_proto_list.json create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_serialization_client.ts create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_serialization_client_config.json create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_serialization_proto_list.json create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/system-test/install.ts create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/test/gapic_data_catalog_v1.ts create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/test/gapic_policy_tag_manager_serialization_v1.ts create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/test/gapic_policy_tag_manager_v1.ts create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/tsconfig.json create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/webpack.config.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/.eslintignore create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/.eslintrc.json create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/.gitignore create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/.jsdoc.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/.mocharc.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/.prettierrc.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/README.md create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/package.json create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/common.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/datacatalog.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/policytagmanager.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/schema.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/search.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/table_spec.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/tags.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/timestamps.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/usage.proto create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/protos.d.ts create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/protos.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/protos.json create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_entry.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_entry_group.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_tag.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_tag_template.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_tag_template_field.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_entry.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_entry_group.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_tag.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_tag_template.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_tag_template_field.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_entry.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_entry_group.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_iam_policy.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_tag_template.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.list_entries.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.list_entry_groups.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.list_tags.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.lookup_entry.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.rename_tag_template_field.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.rename_tag_template_field_enum_value.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.search_catalog.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.set_iam_policy.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.test_iam_permissions.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_entry.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_entry_group.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_tag.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_tag_template.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_tag_template_field.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.create_policy_tag.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.create_taxonomy.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.delete_policy_tag.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.delete_taxonomy.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.get_iam_policy.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.get_policy_tag.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.get_taxonomy.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.list_policy_tags.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.list_taxonomies.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.set_iam_policy.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.test_iam_permissions.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.update_policy_tag.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.update_taxonomy.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager_serialization.export_taxonomies.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager_serialization.import_taxonomies.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.datacatalog.v1beta1.json create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/src/index.ts create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/data_catalog_client.ts create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/data_catalog_client_config.json create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/data_catalog_proto_list.json create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/index.ts create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_client.ts create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_client_config.json create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_proto_list.json create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_serialization_client.ts create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_serialization_client_config.json create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_serialization_proto_list.json create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/system-test/install.ts create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/test/gapic_data_catalog_v1beta1.ts create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/test/gapic_policy_tag_manager_serialization_v1beta1.ts create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/test/gapic_policy_tag_manager_v1beta1.ts create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/tsconfig.json create mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/webpack.config.js diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/.eslintignore b/owl-bot-staging/google-cloud-datacatalog/v1/.eslintignore new file mode 100644 index 00000000000..cfc348ec4d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/.eslintrc.json b/owl-bot-staging/google-cloud-datacatalog/v1/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/.gitignore b/owl-bot-staging/google-cloud-datacatalog/v1/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/.jsdoc.js b/owl-bot-staging/google-cloud-datacatalog/v1/.jsdoc.js new file mode 100644 index 00000000000..ac28df7d11a --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 2025 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/datacatalog', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/.mocharc.js b/owl-bot-staging/google-cloud-datacatalog/v1/.mocharc.js new file mode 100644 index 00000000000..24e9d15257f --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/.mocharc.js @@ -0,0 +1,33 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/.prettierrc.js b/owl-bot-staging/google-cloud-datacatalog/v1/.prettierrc.js new file mode 100644 index 00000000000..d89a632f90b --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/.prettierrc.js @@ -0,0 +1,22 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/README.md b/owl-bot-staging/google-cloud-datacatalog/v1/README.md new file mode 100644 index 00000000000..32cb6c97c40 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/README.md @@ -0,0 +1 @@ +Datacatalog: Nodejs Client diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/package.json b/owl-bot-staging/google-cloud-datacatalog/v1/package.json new file mode 100644 index 00000000000..422f93bf7e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/package.json @@ -0,0 +1,60 @@ +{ + "name": "@google-cloud/datacatalog", + "version": "0.1.0", + "description": "Datacatalog client for Node.js", + "repository": "googleapis/nodejs-datacatalog", + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google datacatalog", + "datacatalog", + "data catalog", + "policy tag manager", + "policy tag manager serialization" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^4.3.4" + }, + "devDependencies": { + "@types/mocha": "^10.0.6", + "@types/node": "^20.12.12", + "@types/sinon": "^10.0.20", + "c8": "^9.1.0", + "gapic-tools": "^0.4.2", + "gts": "5.3.0", + "jsdoc": "^4.0.3", + "jsdoc-fresh": "^3.0.0", + "jsdoc-region-tag": "^3.0.0", + "mocha": "^10.4.0", + "pack-n-play": "^2.0.3", + "sinon": "^15.2.0", + "typescript": "5.1.6" + }, + "engines": { + "node": ">=v14" + } +} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/bigquery.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/bigquery.proto new file mode 100644 index 00000000000..3ca0caf073d --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/bigquery.proto @@ -0,0 +1,81 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; +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/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/common.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/common.proto new file mode 100644 index 00000000000..c43b226f001 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/common.proto @@ -0,0 +1,81 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1; + +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; +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; + + // Cloud Spanner + CLOUD_SPANNER = 6; + + // Cloud Bigtable + CLOUD_BIGTABLE = 7; + + // Cloud Sql + CLOUD_SQL = 8; + + // Looker + LOOKER = 9; + + // Vertex AI + VERTEX_AI = 10; +} + +// This enum describes all the systems that manage +// Taxonomy and PolicyTag resources in DataCatalog. +enum ManagingSystem { + // Default value + MANAGING_SYSTEM_UNSPECIFIED = 0; + + // Dataplex. + MANAGING_SYSTEM_DATAPLEX = 1; + + // Other + MANAGING_SYSTEM_OTHER = 2; +} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/data_source.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/data_source.proto new file mode 100644 index 00000000000..7e9f43116b8 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/data_source.proto @@ -0,0 +1,86 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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 csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; +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/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/datacatalog.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/datacatalog.proto new file mode 100644 index 00000000000..e9581cb2809 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/datacatalog.proto @@ -0,0 +1,2412 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.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/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; +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"; + } + + // `ReconcileTags` creates or updates a list of tags on the entry. + // If the + // [ReconcileTagsRequest.force_delete_missing][google.cloud.datacatalog.v1.ReconcileTagsRequest.force_delete_missing] + // parameter is set, the operation deletes tags not included in the input tag + // list. + // + // `ReconcileTags` returns a [long-running operation] + // [google.longrunning.Operation] resource that can be queried with + // [Operations.GetOperation][google.longrunning.Operations.GetOperation] + // to return [ReconcileTagsMetadata] + // [google.cloud.datacatalog.v1.ReconcileTagsMetadata] and + // a [ReconcileTagsResponse] + // [google.cloud.datacatalog.v1.ReconcileTagsResponse] message. + rpc ReconcileTags(ReconcileTagsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags:reconcile" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "ReconcileTagsResponse" + metadata_type: "ReconcileTagsMetadata" + }; + } + + // 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: "*" + } + }; + } + + // Imports entries from a source, such as data previously dumped into a + // Cloud Storage bucket, into Data Catalog. Import of entries + // is a sync operation that reconciles the state of the third-party system + // with the Data Catalog. + // + // `ImportEntries` accepts source data snapshots of a third-party system. + // Snapshot should be delivered as a .wire or base65-encoded .txt file + // containing a sequence of Protocol Buffer messages of + // [DumpItem][google.cloud.datacatalog.v1.DumpItem] type. + // + // `ImportEntries` returns a [long-running operation] + // [google.longrunning.Operation] resource that can be queried with + // [Operations.GetOperation][google.longrunning.Operations.GetOperation] + // to return + // [ImportEntriesMetadata][google.cloud.datacatalog.v1.ImportEntriesMetadata] + // and an + // [ImportEntriesResponse][google.cloud.datacatalog.v1.ImportEntriesResponse] + // message. + rpc ImportEntries(ImportEntriesRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries:import" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "ImportEntriesResponse" + metadata_type: "ImportEntriesMetadata" + }; + } + + // Sets the configuration related to the migration to Dataplex for an + // organization or project. + rpc SetConfig(SetConfigRequest) returns (MigrationConfig) { + option (google.api.http) = { + post: "/v1/{name=organizations/*/locations/*}:setConfig" + body: "*" + additional_bindings { + post: "/v1/{name=projects/*/locations/*}:setConfig" + body: "*" + } + }; + } + + // Retrieves the configuration related to the migration from Data Catalog to + // Dataplex for a specific organization, including all the projects under it + // which have a separate configuration set. + rpc RetrieveConfig(RetrieveConfigRequest) returns (OrganizationConfig) { + option (google.api.http) = { + get: "/v1/{name=organizations/*/locations/*}:retrieveConfig" + }; + } + + // Retrieves the effective configuration related to the migration from Data + // Catalog to Dataplex for a specific organization or project. If there is no + // specific configuration set for the resource, the setting is checked + // hierarchicahlly through the ancestors of the resource, starting from the + // resource itself. + rpc RetrieveEffectiveConfig(RetrieveEffectiveConfigRequest) + returns (MigrationConfig) { + option (google.api.http) = { + get: "/v1/{name=organizations/*/locations/*}:retrieveEffectiveConfig" + additional_bindings { + get: "/v1/{name=projects/*/locations/*}:retrieveEffectiveConfig" + } + }; + } +} + +// 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 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]; + + // Upper bound on the number of results you can get in a single response. + // + // 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 + // + // 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. + // If you are experiencing recall issues and you don't have to fetch the + // results in any specific order, consider setting this parameter to + // `default`. + // + // If this parameter is omitted, it defaults to the descending `relevance`. + string order_by = 5; + + // Optional. If set, use searchAll permission granted on organizations from + // `include_org_ids` and projects from `include_project_ids` instead of the + // fine grained per resource permissions when filtering the search results. + // The only allowed `order_by` criteria for admin_search mode is `default`. + // Using this flags guarantees a full recall of the search results. + bool admin_search = 17 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. +message SearchCatalogResponse { + // Search results. + repeated SearchCatalogResult results = 1; + + // The approximate total number of entries matched by the query. + int32 total_size = 2; + + // 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)](https://cloud.google.com//data-catalog/docs/fully-qualified-names) + // 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; + } + + // Project where the lookup should be performed. Required to lookup + // entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` + // using its `fully_qualified_name`. Ignored in other cases. + string project = 6; + + // Location where the lookup should be performed. Required to lookup + // entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` + // using its `fully_qualified_name`. Ignored in other cases. + string location = 7; +} + +// 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. Identifier. 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.field_behavior) = IDENTIFIER, + (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)](https://cloud.google.com//data-catalog/docs/fully-qualified-names) + // of the resource. Set automatically for entries representing resources from + // synced systems. Settable only during creation, and read-only later. Can + // be used for search and lookup of the entries. + // + string fully_qualified_name = 29; + + // Required. Entry type. + oneof entry_type { + // The type of the entry. + // + // For details, see [`EntryType`](#entrytype). + 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; + } + + // System specification. + // Can be used as a complement for `spec`, when some metadata is relevant for + // all entries existing within given system + oneof system_spec { + // Specification that applies to a relational database system. Only settable + // when `user_specified_system` is equal to `SQL_DATABASE` + SqlDatabaseSystemSpec sql_database_system_spec = 39; + + // Specification that applies to Looker sysstem. Only settable when + // `user_specified_system` is equal to `LOOKER` + LookerSystemSpec looker_system_spec = 40; + + // Specification that applies to Cloud Bigtable system. Only settable when + // `integrated_system` is equal to `CLOUD_BIGTABLE` + CloudBigtableSystemSpec cloud_bigtable_system_spec = 41; + } + + // 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` or `EXPLORE` 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 dataset. + DatasetSpec dataset_spec = 32; + + // Specification that applies to a fileset resource. Valid only + // for entries with the `FILESET` type. + FilesetSpec fileset_spec = 33; + + // Specification that applies to a Service resource. + ServiceSpec service_spec = 42; + + // Model specification. + ModelSpec model_spec = 43; + + // FeatureonlineStore spec for Vertex AI Feature Store. + FeatureOnlineStoreSpec feature_online_store_spec = 45; + } + + // Display name of an entry. + // + // The maximum size is 500 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; + } + + // Specification that applies to database view. + message DatabaseViewSpec { + // Concrete type of the view. + enum ViewType { + // Default unknown view type. + VIEW_TYPE_UNSPECIFIED = 0; + + // Standard view. + STANDARD_VIEW = 1; + + // Materialized view. + MATERIALIZED_VIEW = 2; + } + + // Type of this view. + ViewType view_type = 1; + + // Definition of the view. + oneof source_definition { + // Name of a singular table this view reflects one to one. + string base_table = 2; + + // SQL query used to generate this view. + string sql_query = 3; + } + } + + // 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]; + + // Spec what aplies to tables that are actually views. + // Not set for "real" tables. + DatabaseViewSpec database_view_spec = 3; +} + +// 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; + } +} + +// Specification that applies to a dataset. Valid only for +// entries with the `DATASET` type. +message DatasetSpec { + // Fields specific to the source system. + oneof system_spec { + // Vertex AI Dataset specific fields + VertexDatasetSpec vertex_dataset_spec = 2; + } +} + +// Specification that applies to +// entries that are part `SQL_DATABASE` system +// (user_specified_type) +message SqlDatabaseSystemSpec { + // SQL Database Engine. + // enum SqlEngine { + // UNDEFINED = 0; + // MY_SQL = 1; + // POSTGRE_SQL = 2; + // SQL_SERVER = 3; + // } + // Engine of the enclosing database instance. + string sql_engine = 1; + + // Version of the database engine. + string database_version = 2; + + // Host of the SQL database + // enum InstanceHost { + // UNDEFINED = 0; + // SELF_HOSTED = 1; + // CLOUD_SQL = 2; + // AMAZON_RDS = 3; + // AZURE_SQL = 4; + // } + // Host of the enclousing database instance. + string instance_host = 3; +} + +// Specification that applies to +// entries that are part `LOOKER` system +// (user_specified_type) +message LookerSystemSpec { + // ID of the parent Looker Instance. Empty if it does not exist. + // Example value: `someinstance.looker.com` + string parent_instance_id = 1; + + // Name of the parent Looker Instance. Empty if it does not exist. + string parent_instance_display_name = 2; + + // ID of the parent Model. Empty if it does not exist. + string parent_model_id = 3; + + // Name of the parent Model. Empty if it does not exist. + string parent_model_display_name = 4; + + // ID of the parent View. Empty if it does not exist. + string parent_view_id = 5; + + // Name of the parent View. Empty if it does not exist. + string parent_view_display_name = 6; +} + +// Specification that applies to +// all entries that are part of `CLOUD_BIGTABLE` system +// (user_specified_type) +message CloudBigtableSystemSpec { + // Display name of the Instance. This is user specified and different from + // the resource name. + string instance_display_name = 1; +} + +// Specification that applies to Instance +// entries that are part of `CLOUD_BIGTABLE` system. +// (user_specified_type) +message CloudBigtableInstanceSpec { + // Spec that applies to clusters of an Instance of Cloud Bigtable. + message CloudBigtableClusterSpec { + // Name of the cluster. + string display_name = 1; + + // Location of the cluster, typically a Cloud zone. + string location = 2; + + // Type of the resource. For a cluster this would be "CLUSTER". + string type = 3; + + // A link back to the parent resource, in this case Instance. + string linked_resource = 4; + } + + // The list of clusters for the Instance. + repeated CloudBigtableClusterSpec cloud_bigtable_cluster_specs = 1; +} + +// Specification that applies to a Service resource. Valid only +// for entries with the `SERVICE` type. +message ServiceSpec { + // System spec + oneof system_spec { + // Specification that applies to Instance entries of `CLOUD_BIGTABLE` + // system. + CloudBigtableInstanceSpec cloud_bigtable_instance_spec = 1; + } +} + +// Detail description of the source information of a Vertex model. +message VertexModelSourceInfo { + // Source of the model. + enum ModelSourceType { + // Should not be used. + MODEL_SOURCE_TYPE_UNSPECIFIED = 0; + + // The Model is uploaded by automl training pipeline. + AUTOML = 1; + + // The Model is uploaded by user or custom training pipeline. + CUSTOM = 2; + + // The Model is registered and sync'ed from BigQuery ML. + BQML = 3; + + // The Model is saved or tuned from Model Garden. + MODEL_GARDEN = 4; + + // The Model is saved or tuned from Genie. + GENIE = 5; + + // The Model is uploaded by text embedding finetuning pipeline. + CUSTOM_TEXT_EMBEDDING = 6; + + // The Model is saved or tuned from Marketplace. + MARKETPLACE = 7; + } + + // Type of the model source. + ModelSourceType source_type = 1; + + // If this Model is copy of another Model. If true then + // [source_type][google.cloud.datacatalog.v1.VertexModelSourceInfo.source_type] + // pertains to the original. + bool copy = 2; +} + +// Specification for vertex model resources. +message VertexModelSpec { + // The version ID of the model. + string version_id = 1; + + // User provided version aliases so that a model version can be referenced via + // alias + repeated string version_aliases = 2; + + // The description of this version. + string version_description = 3; + + // Source of a Vertex model. + VertexModelSourceInfo vertex_model_source_info = 4; + + // URI of the Docker image to be used as the custom container for serving + // predictions. + string container_image_uri = 5; +} + +// Specification for vertex dataset resources. +message VertexDatasetSpec { + // Type of data stored in the dataset. + enum DataType { + // Should not be used. + DATA_TYPE_UNSPECIFIED = 0; + + // Structured data dataset. + TABLE = 1; + + // Image dataset which supports ImageClassification, ImageObjectDetection + // and ImageSegmentation problems. + IMAGE = 2; + + // Document dataset which supports TextClassification, TextExtraction and + // TextSentiment problems. + TEXT = 3; + + // Video dataset which supports VideoClassification, VideoObjectTracking and + // VideoActionRecognition problems. + VIDEO = 4; + + // Conversation dataset which supports conversation problems. + CONVERSATION = 5; + + // TimeSeries dataset. + TIME_SERIES = 6; + + // Document dataset which supports DocumentAnnotation problems. + DOCUMENT = 7; + + // TextToSpeech dataset which supports TextToSpeech problems. + TEXT_TO_SPEECH = 8; + + // Translation dataset which supports Translation problems. + TRANSLATION = 9; + + // Store Vision dataset which is used for HITL integration. + STORE_VISION = 10; + + // Enterprise Knowledge Graph dataset which is used for HITL labeling + // integration. + ENTERPRISE_KNOWLEDGE_GRAPH = 11; + + // Text prompt dataset which supports Large Language Models. + TEXT_PROMPT = 12; + } + + // The number of DataItems in this Dataset. Only apply for non-structured + // Dataset. + int64 data_item_count = 1; + + // Type of the dataset. + DataType data_type = 2; +} + +// Specification that applies to a model. Valid only for +// entries with the `MODEL` type. +message ModelSpec { + // System spec + oneof system_spec { + // Specification for vertex model resources. + VertexModelSpec vertex_model_spec = 1; + } +} + +// Detail description of the source information of a Vertex Feature Online +// Store. +message FeatureOnlineStoreSpec { + // Type of underlaying storage type. + enum StorageType { + // Should not be used. + STORAGE_TYPE_UNSPECIFIED = 0; + + // Underlsying storgae is Bigtable. + BIGTABLE = 1; + + // Underlaying is optimized online server (Lightning). + OPTIMIZED = 2; + } + + // Output only. Type of underelaying storage for the FeatureOnlineStore. + StorageType storage_type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// 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}" + }; + + // Identifier. 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 [(google.api.field_behavior) = IDENTIFIER]; + + // 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]; + + // Optional. When set to [true], it means DataCatalog EntryGroup was + // transferred to Dataplex Catalog Service. It makes EntryGroup and its + // Entries to be read-only in DataCatalog. However, new Tags on EntryGroup and + // its Entries can be created. After setting the flag to [true] it cannot be + // unset. + bool transferred_to_dataplex = 9 [(google.api.field_behavior) = OPTIONAL]; +} + +// 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 +// [ReconcileTags][google.cloud.datacatalog.v1.DataCatalog.ReconcileTags]. +message ReconcileTagsRequest { + // Required. Name of [Entry][google.cloud.datacatalog.v1.Entry] to be tagged. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Entry" + } + ]; + + // Required. The name of the tag template, which is used for reconciliation. + string tag_template = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/TagTemplate" + } + ]; + + // If set to `true`, deletes entry tags related to a tag template + // not listed in the tags source from an entry. If set to `false`, + // unlisted tags are retained. + bool force_delete_missing = 3; + + // A list of tags to apply to an entry. A tag can specify a + // tag template, which must be the template specified in the + // `ReconcileTagsRequest`. + // The sole entry and each of its columns must be mentioned at most once. + repeated Tag tags = 4; +} + +// [Long-running operation][google.longrunning.Operation] +// response message returned by +// [ReconcileTags][google.cloud.datacatalog.v1.DataCatalog.ReconcileTags]. +message ReconcileTagsResponse { + // Number of tags created in the request. + int64 created_tags_count = 1; + + // Number of tags updated in the request. + int64 updated_tags_count = 2; + + // Number of tags deleted in the request. + int64 deleted_tags_count = 3; +} + +// [Long-running operation][google.longrunning.Operation] +// metadata message returned by the +// [ReconcileTags][google.cloud.datacatalog.v1.DataCatalog.ReconcileTags]. +message ReconcileTagsMetadata { + // Enum holding possible states of the reconciliation operation. + enum ReconciliationState { + // Default value. This value is unused. + RECONCILIATION_STATE_UNSPECIFIED = 0; + + // The reconciliation has been queued and awaits for execution. + RECONCILIATION_QUEUED = 1; + + // The reconciliation is in progress. + RECONCILIATION_IN_PROGRESS = 2; + + // The reconciliation has been finished. + RECONCILIATION_DONE = 3; + } + + // State of the reconciliation operation. + ReconciliationState state = 1; + + // Maps the name of each tagged column (or empty string for a + // sole entry) to tagging operation [status][google.rpc.Status]. + map errors = 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 +// [ImportEntries][google.cloud.datacatalog.v1.DataCatalog.ImportEntries] +// method. +message ImportEntriesRequest { + // Required. Target entry group for ingested entries. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/Entry" + } + ]; + + // Source of imported entries, e.g. dump stored in a Cloud Storage + oneof source { + // Path to a Cloud Storage bucket that contains a dump ready for ingestion. + string gcs_bucket_path = 2; + } + + // Optional. (Optional) Dataplex task job id, if specified will be used as + // part of ImportEntries LRO ID + string job_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for [long-running operation][google.longrunning.Operation] +// returned by the +// [ImportEntries][google.cloud.datacatalog.v1.DataCatalog.ImportEntries]. +message ImportEntriesResponse { + // Cumulative number of entries created and entries updated as a result of + // import operation. + optional int64 upserted_entries_count = 5; + + // Number of entries deleted as a result of import operation. + optional int64 deleted_entries_count = 6; +} + +// Metadata message for [long-running operation][google.longrunning.Operation] +// returned by the +// [ImportEntries][google.cloud.datacatalog.v1.DataCatalog.ImportEntries]. +message ImportEntriesMetadata { + // Enum holding possible states of the import operation. + enum ImportState { + // Default value. This value is unused. + IMPORT_STATE_UNSPECIFIED = 0; + + // The dump with entries has been queued for import. + IMPORT_QUEUED = 1; + + // The import of entries is in progress. + IMPORT_IN_PROGRESS = 2; + + // The import of entries has been finished. + IMPORT_DONE = 3; + + // The import of entries has been abandoned in favor of a newer request. + IMPORT_OBSOLETE = 4; + } + + // State of the import operation. + ImportState state = 1; + + // Partial errors that are encountered during the ImportEntries operation. + // There is no guarantee that all the encountered errors are reported. + // However, if no errors are reported, it means that no errors were + // encountered. + repeated google.rpc.Status errors = 2; +} + +// 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]; +} + +// Metadata automatically ingested from Google Cloud resources like BigQuery +// tables or Pub/Sub topics always uses enum values from `EntryType` as the type +// of entry. +// +// Other sources of metadata like Hive or Oracle databases can identify the type +// by either using one of the enum values from `EntryType` (for example, +// `FILESET` for a Cloud Storage fileset) or specifying a custom value using +// the [`Entry`](#resource:-entry) field `user_specified_type`. For more +// information, see +// [Surface files from Cloud Storage with fileset +// entries](/data-catalog/docs/how-to/filesets) or [Create custom entries for +// your data sources](/data-catalog/docs/how-to/custom-entries). +enum EntryType { + // Default unknown type. + ENTRY_TYPE_UNSPECIFIED = 0; + + // The entry type that has a GoogleSQL schema, including + // logical views. + TABLE = 2; + + // The type of models. + // + // For more information, see [Supported models in BigQuery + // ML](/bigquery/docs/bqml-introduction#supported_models). + 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; + + // Connection to a data source. For example, a BigQuery + // connection. + DATA_SOURCE_CONNECTION = 8; + + // 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; + + // Schema within a relational database. + DATABASE_SCHEMA = 15; + + // A Dashboard, for example from Looker. + DASHBOARD = 16; + + // A Looker Explore. + // + // For more information, see [Looker Explore API] + // (https://developers.looker.com/api/explorer/4.0/methods/LookmlModel/lookml_model_explore). + EXPLORE = 17; + + // A Looker Look. + // + // For more information, see [Looker Look API] + // (https://developers.looker.com/api/explorer/4.0/methods/Look). + LOOK = 18; + + // Feature Online Store resource in Vertex AI Feature Store. + FEATURE_ONLINE_STORE = 19; + + // Feature View resource in Vertex AI Feature Store. + FEATURE_VIEW = 20; + + // Feature Group resource in Vertex AI Feature Store. + FEATURE_GROUP = 21; +} + +// Request message for +// [SetConfig][google.cloud.datacatalog.v1.DataCatalog.SetConfig]. +message SetConfigRequest { + // Required. The organization or project whose config is being specified. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // The configuration field to set. + oneof configuration { + // Opt-in status for the migration of Tag Templates to Dataplex. + TagTemplateMigration tag_template_migration = 2; + + // Opt-in status for the UI switch to Dataplex. + CatalogUIExperience catalog_ui_experience = 3; + } +} + +// Request message for +// [RetrieveConfig][google.cloud.datacatalog.v1.DataCatalog.RetrieveConfig]. +message RetrieveConfigRequest { + // Required. The organization whose config is being retrieved. + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [RetrieveEffectiveConfig][google.cloud.datacatalog.v1.DataCatalog.RetrieveEffectiveConfig]. +message RetrieveEffectiveConfigRequest { + // Required. The resource whose effective config is being retrieved. + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Configuration related to the opt-in status for the migration of TagTemplates +// to Dataplex. +enum TagTemplateMigration { + // Default value. Migration of Tag Templates from Data Catalog to Dataplex is + // not performed. + TAG_TEMPLATE_MIGRATION_UNSPECIFIED = 0; + + // Migration of Tag Templates from Data Catalog to Dataplex is enabled. + TAG_TEMPLATE_MIGRATION_ENABLED = 1; + + // Migration of Tag Templates from Data Catalog to Dataplex is disabled. + TAG_TEMPLATE_MIGRATION_DISABLED = 2; +} + +// Configuration related to the opt-in status for the UI switch to Dataplex. +enum CatalogUIExperience { + // Default value. The default UI is Dataplex. + CATALOG_UI_EXPERIENCE_UNSPECIFIED = 0; + + // The UI is Dataplex. + CATALOG_UI_EXPERIENCE_ENABLED = 1; + + // The UI is Data Catalog. + CATALOG_UI_EXPERIENCE_DISABLED = 2; +} + +// The configuration related to the migration from Data Catalog to Dataplex that +// has been applied to an organization and any projects under it. It is the +// response message for +// [RetrieveConfig][google.cloud.datacatalog.v1.DataCatalog.RetrieveConfig]. +message OrganizationConfig { + // Map of organizations and project resource names and their configuration. + // The format for the map keys is `organizations/{organizationId}` or + // `projects/{projectId}`. + map config = 1; +} + +// The configuration related to the migration to Dataplex applied to an +// organization or project. +// It is the response message for +// [SetConfig][google.cloud.datacatalog.v1.DataCatalog.SetConfig] and +// [RetrieveEffectiveConfig][google.cloud.datacatalog.v1.DataCatalog.RetrieveEffectiveConfig]. +message MigrationConfig { + // Opt-in status for the migration of Tag Templates to Dataplex. + TagTemplateMigration tag_template_migration = 1; + + // Opt-in status for the UI switch to Dataplex. + CatalogUIExperience catalog_ui_experience = 2; +} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/dataplex_spec.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/dataplex_spec.proto new file mode 100644 index 00000000000..ce10b33eda7 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/dataplex_spec.proto @@ -0,0 +1,89 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1; + +import "google/cloud/datacatalog/v1/common.proto"; +import "google/cloud/datacatalog/v1/physical_schema.proto"; + +option csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; +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/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/dump_content.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/dump_content.proto new file mode 100644 index 00000000000..87afabf0a48 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/dump_content.proto @@ -0,0 +1,55 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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/datacatalog.proto"; +import "google/cloud/datacatalog/v1/tags.proto"; + +option csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; +option java_multiple_files = true; +option java_outer_classname = "DumpContentProto"; +option java_package = "com.google.cloud.datacatalog.v1"; +option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; +option ruby_package = "Google::Cloud::DataCatalog::V1"; + +// Wrapper containing Entry and information about Tags +// that should and should not be attached to it. +message TaggedEntry { + // Required. Entry to be ingested. + oneof entry { + // Non-encrypted Data Catalog v1 Entry. + Entry v1_entry = 1; + } + + // Optional. Tags that should be ingested into the Data Catalog. + // Caller should populate template name, column and fields. + repeated Tag present_tags = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Tags that should be deleted from the Data Catalog. + // Caller should populate template name and column only. + repeated Tag absent_tags = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Wrapper for any item that can be contained in the dump. +message DumpItem { + oneof item { + // Entry and its tags. + TaggedEntry tagged_entry = 1; + } +} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/gcs_fileset_spec.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/gcs_fileset_spec.proto new file mode 100644 index 00000000000..67bedae49d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/gcs_fileset_spec.proto @@ -0,0 +1,80 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1; + +import "google/api/field_behavior.proto"; +import "google/cloud/datacatalog/v1/timestamps.proto"; + +option csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; +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/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/physical_schema.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/physical_schema.proto new file mode 100644 index 00000000000..89a9cd5e820 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/physical_schema.proto @@ -0,0 +1,76 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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 csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; +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/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/policytagmanager.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/policytagmanager.proto new file mode 100644 index 00000000000..e97ddb7cd1a --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/policytagmanager.proto @@ -0,0 +1,506 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.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/common.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 csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; +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; + } + + // The source system of the Taxonomy. + message Service { + // The Google Cloud service name. + ManagingSystem name = 1; + + // The service agent for the service. + string identity = 2; + } + + // Identifier. Resource name of this taxonomy in URL format. + // + // Note: Policy tag manager generates unique taxonomy IDs. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // 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]; + + // Output only. Identity of the service which owns the Taxonomy. This field is + // only populated when the taxonomy is created by a Google Cloud service. + // Currently only 'DATAPLEX' is supported. + Service service = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// 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}" + }; + + // Identifier. 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) = IDENTIFIER]; + + // 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; + + // Supported field for filter is 'service' and value is 'dataplex'. + // Eg: service=dataplex. + string filter = 4; +} + +// 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/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/policytagmanagerserialization.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/policytagmanagerserialization.proto new file mode 100644 index 00000000000..aac2d469f23 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/policytagmanagerserialization.proto @@ -0,0 +1,229 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.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 csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; +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/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/schema.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/schema.proto new file mode 100644 index 00000000000..e0d735d626d --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/schema.proto @@ -0,0 +1,148 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; +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 { + // Specifies inclusion of the column in an index + enum IndexingType { + // Unspecified. + INDEXING_TYPE_UNSPECIFIED = 0; + + // Column not a part of an index. + INDEXING_TYPE_NONE = 1; + + // Column Part of non unique index. + INDEXING_TYPE_NON_UNIQUE = 2; + + // Column part of unique index. + INDEXING_TYPE_UNIQUE = 3; + + // Column part of the primary key. + INDEXING_TYPE_PRIMARY_KEY = 4; + } + + // Column info specific to Looker System. + message LookerColumnSpec { + // Column type in Looker. + enum LookerColumnType { + // Unspecified. + LOOKER_COLUMN_TYPE_UNSPECIFIED = 0; + + // Dimension. + DIMENSION = 1; + + // Dimension group - parent for Dimension. + DIMENSION_GROUP = 2; + + // Filter. + FILTER = 3; + + // Measure. + MEASURE = 4; + + // Parameter. + PARAMETER = 5; + } + + // Looker specific column type of this column. + LookerColumnType type = 1; + } + + // Represents the type of a field element. + message FieldElementType { + // Required. The type of a field element. See + // [ColumnSchema.type][google.cloud.datacatalog.v1.ColumnSchema.type]. + string type = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // 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. Default value for the column. + string default_value = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Ordinal position + int32 ordinal_position = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Most important inclusion of this column. + IndexingType highest_indexing_type = 10 + [(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]; + + // Information only applying for columns in Entries from a specific system. + oneof system_spec { + // Looker specific column info of this column. + LookerColumnSpec looker_column_spec = 18; + } + + // Optional. The subtype of the RANGE, if the type of this field is RANGE. If + // the type is RANGE, this field is required. Possible values for the field + // element type of a RANGE include: + // * DATE + // * DATETIME + // * TIMESTAMP + FieldElementType range_element_type = 19 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Garbage collection policy for the column or column family. + // Applies to systems like Cloud Bigtable. + string gc_rule = 11 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/search.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/search.proto new file mode 100644 index 00000000000..2ebd8851123 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/search.proto @@ -0,0 +1,119 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1; + +import "google/api/field_behavior.proto"; +import "google/cloud/datacatalog/v1/common.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; +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/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/table_spec.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/table_spec.proto new file mode 100644 index 00000000000..912f752096c --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/table_spec.proto @@ -0,0 +1,114 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; +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/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/tags.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/tags.proto new file mode 100644 index 00000000000..de175d32c9e --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/tags.proto @@ -0,0 +1,307 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; +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}" + }; + + // Identifier. 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 [(google.api.field_behavior) = IDENTIFIER]; + + // 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]; + + // Output only. Denotes the transfer status of the Tag Template. + TagTemplate.DataplexTransferStatus dataplex_transfer_status = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// 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 Google Cloud +// 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}" + }; + + // This enum describes TagTemplate transfer status to Dataplex service. + enum DataplexTransferStatus { + // Default value. TagTemplate and its tags are only visible and editable in + // DataCatalog. + DATAPLEX_TRANSFER_STATUS_UNSPECIFIED = 0; + + // TagTemplate and its tags are auto-copied to Dataplex service. + // Visible in both services. Editable in DataCatalog, read-only in Dataplex. + // Deprecated: Individual TagTemplate migration is deprecated in favor of + // organization or project wide TagTemplate migration opt-in. + MIGRATED = 1 [deprecated = true]; + + // TagTemplate and its tags are auto-copied to Dataplex service. + // Visible in both services. Editable in Dataplex, read-only in DataCatalog. + TRANSFERRED = 2; + } + + // Identifier. 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 [(google.api.field_behavior) = IDENTIFIER]; + + // 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.DataCatalog.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]; + + // Optional. Transfer status of the TagTemplate + DataplexTransferStatus dataplex_transfer_status = 7 + [(google.api.field_behavior) = OPTIONAL]; +} + +// 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}" + }; + + // Identifier. 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) = IDENTIFIER]; + + // 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/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/timestamps.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/timestamps.proto new file mode 100644 index 00000000000..e14cf432142 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/timestamps.proto @@ -0,0 +1,48 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; +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/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/usage.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/usage.proto new file mode 100644 index 00000000000..145606070b2 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/usage.proto @@ -0,0 +1,83 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; +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; +} + +// Common statistics on the entry's usage. +// +// They can be set on any system. +message CommonUsageStats { + // View count in source system. + optional int64 view_count = 1; +} + +// 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]; + + // Common usage statistics over each of the predefined time ranges. + // + // Supported time ranges are `{"24H", "7D", "30D", "Lifetime"}`. + map common_usage_within_time_range = 3; + + // Favorite count in the source system. + optional int64 favorite_count = 4; +} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/protos/protos.d.ts b/owl-bot-staging/google-cloud-datacatalog/v1/protos/protos.d.ts new file mode 100644 index 00000000000..dd97c0739b2 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/protos/protos.d.ts @@ -0,0 +1,25619 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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, + CLOUD_SPANNER = 6, + CLOUD_BIGTABLE = 7, + CLOUD_SQL = 8, + LOOKER = 9, + VERTEX_AI = 10 + } + + /** ManagingSystem enum. */ + enum ManagingSystem { + MANAGING_SYSTEM_UNSPECIFIED = 0, + MANAGING_SYSTEM_DATAPLEX = 1, + MANAGING_SYSTEM_OTHER = 2 + } + + /** 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 ReconcileTags. + * @param request ReconcileTagsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public reconcileTags(request: google.cloud.datacatalog.v1.IReconcileTagsRequest, callback: google.cloud.datacatalog.v1.DataCatalog.ReconcileTagsCallback): void; + + /** + * Calls ReconcileTags. + * @param request ReconcileTagsRequest message or plain object + * @returns Promise + */ + public reconcileTags(request: google.cloud.datacatalog.v1.IReconcileTagsRequest): 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; + + /** + * Calls ImportEntries. + * @param request ImportEntriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public importEntries(request: google.cloud.datacatalog.v1.IImportEntriesRequest, callback: google.cloud.datacatalog.v1.DataCatalog.ImportEntriesCallback): void; + + /** + * Calls ImportEntries. + * @param request ImportEntriesRequest message or plain object + * @returns Promise + */ + public importEntries(request: google.cloud.datacatalog.v1.IImportEntriesRequest): Promise; + + /** + * Calls SetConfig. + * @param request SetConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MigrationConfig + */ + public setConfig(request: google.cloud.datacatalog.v1.ISetConfigRequest, callback: google.cloud.datacatalog.v1.DataCatalog.SetConfigCallback): void; + + /** + * Calls SetConfig. + * @param request SetConfigRequest message or plain object + * @returns Promise + */ + public setConfig(request: google.cloud.datacatalog.v1.ISetConfigRequest): Promise; + + /** + * Calls RetrieveConfig. + * @param request RetrieveConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and OrganizationConfig + */ + public retrieveConfig(request: google.cloud.datacatalog.v1.IRetrieveConfigRequest, callback: google.cloud.datacatalog.v1.DataCatalog.RetrieveConfigCallback): void; + + /** + * Calls RetrieveConfig. + * @param request RetrieveConfigRequest message or plain object + * @returns Promise + */ + public retrieveConfig(request: google.cloud.datacatalog.v1.IRetrieveConfigRequest): Promise; + + /** + * Calls RetrieveEffectiveConfig. + * @param request RetrieveEffectiveConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MigrationConfig + */ + public retrieveEffectiveConfig(request: google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest, callback: google.cloud.datacatalog.v1.DataCatalog.RetrieveEffectiveConfigCallback): void; + + /** + * Calls RetrieveEffectiveConfig. + * @param request RetrieveEffectiveConfigRequest message or plain object + * @returns Promise + */ + public retrieveEffectiveConfig(request: google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest): 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|reconcileTags}. + * @param error Error, if any + * @param [response] Operation + */ + type ReconcileTagsCallback = (error: (Error|null), response?: google.longrunning.Operation) => 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; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|importEntries}. + * @param error Error, if any + * @param [response] Operation + */ + type ImportEntriesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|setConfig}. + * @param error Error, if any + * @param [response] MigrationConfig + */ + type SetConfigCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.MigrationConfig) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|retrieveConfig}. + * @param error Error, if any + * @param [response] OrganizationConfig + */ + type RetrieveConfigCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.OrganizationConfig) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|retrieveEffectiveConfig}. + * @param error Error, if any + * @param [response] MigrationConfig + */ + type RetrieveEffectiveConfigCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.MigrationConfig) => 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); + + /** SearchCatalogRequest adminSearch */ + adminSearch?: (boolean|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; + + /** SearchCatalogRequest adminSearch. */ + public adminSearch: boolean; + + /** + * 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 totalSize */ + totalSize?: (number|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 totalSize. */ + public totalSize: number; + + /** 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); + + /** LookupEntryRequest project */ + project?: (string|null); + + /** LookupEntryRequest location */ + location?: (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 project. */ + public project: string; + + /** LookupEntryRequest location. */ + public location: string; + + /** 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 sqlDatabaseSystemSpec */ + sqlDatabaseSystemSpec?: (google.cloud.datacatalog.v1.ISqlDatabaseSystemSpec|null); + + /** Entry lookerSystemSpec */ + lookerSystemSpec?: (google.cloud.datacatalog.v1.ILookerSystemSpec|null); + + /** Entry cloudBigtableSystemSpec */ + cloudBigtableSystemSpec?: (google.cloud.datacatalog.v1.ICloudBigtableSystemSpec|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 datasetSpec */ + datasetSpec?: (google.cloud.datacatalog.v1.IDatasetSpec|null); + + /** Entry filesetSpec */ + filesetSpec?: (google.cloud.datacatalog.v1.IFilesetSpec|null); + + /** Entry serviceSpec */ + serviceSpec?: (google.cloud.datacatalog.v1.IServiceSpec|null); + + /** Entry modelSpec */ + modelSpec?: (google.cloud.datacatalog.v1.IModelSpec|null); + + /** Entry featureOnlineStoreSpec */ + featureOnlineStoreSpec?: (google.cloud.datacatalog.v1.IFeatureOnlineStoreSpec|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 sqlDatabaseSystemSpec. */ + public sqlDatabaseSystemSpec?: (google.cloud.datacatalog.v1.ISqlDatabaseSystemSpec|null); + + /** Entry lookerSystemSpec. */ + public lookerSystemSpec?: (google.cloud.datacatalog.v1.ILookerSystemSpec|null); + + /** Entry cloudBigtableSystemSpec. */ + public cloudBigtableSystemSpec?: (google.cloud.datacatalog.v1.ICloudBigtableSystemSpec|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 datasetSpec. */ + public datasetSpec?: (google.cloud.datacatalog.v1.IDatasetSpec|null); + + /** Entry filesetSpec. */ + public filesetSpec?: (google.cloud.datacatalog.v1.IFilesetSpec|null); + + /** Entry serviceSpec. */ + public serviceSpec?: (google.cloud.datacatalog.v1.IServiceSpec|null); + + /** Entry modelSpec. */ + public modelSpec?: (google.cloud.datacatalog.v1.IModelSpec|null); + + /** Entry featureOnlineStoreSpec. */ + public featureOnlineStoreSpec?: (google.cloud.datacatalog.v1.IFeatureOnlineStoreSpec|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 systemSpec. */ + public systemSpec?: ("sqlDatabaseSystemSpec"|"lookerSystemSpec"|"cloudBigtableSystemSpec"); + + /** Entry typeSpec. */ + public typeSpec?: ("gcsFilesetSpec"|"bigqueryTableSpec"|"bigqueryDateShardedSpec"); + + /** Entry spec. */ + public spec?: ("databaseTableSpec"|"dataSourceConnectionSpec"|"routineSpec"|"datasetSpec"|"filesetSpec"|"serviceSpec"|"modelSpec"|"featureOnlineStoreSpec"); + + /** + * 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); + + /** DatabaseTableSpec databaseViewSpec */ + databaseViewSpec?: (google.cloud.datacatalog.v1.DatabaseTableSpec.IDatabaseViewSpec|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); + + /** DatabaseTableSpec databaseViewSpec. */ + public databaseViewSpec?: (google.cloud.datacatalog.v1.DatabaseTableSpec.IDatabaseViewSpec|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 DatabaseViewSpec. */ + interface IDatabaseViewSpec { + + /** DatabaseViewSpec viewType */ + viewType?: (google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType|keyof typeof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType|null); + + /** DatabaseViewSpec baseTable */ + baseTable?: (string|null); + + /** DatabaseViewSpec sqlQuery */ + sqlQuery?: (string|null); + } + + /** Represents a DatabaseViewSpec. */ + class DatabaseViewSpec implements IDatabaseViewSpec { + + /** + * Constructs a new DatabaseViewSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.DatabaseTableSpec.IDatabaseViewSpec); + + /** DatabaseViewSpec viewType. */ + public viewType: (google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType|keyof typeof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType); + + /** DatabaseViewSpec baseTable. */ + public baseTable?: (string|null); + + /** DatabaseViewSpec sqlQuery. */ + public sqlQuery?: (string|null); + + /** DatabaseViewSpec sourceDefinition. */ + public sourceDefinition?: ("baseTable"|"sqlQuery"); + + /** + * Creates a new DatabaseViewSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns DatabaseViewSpec instance + */ + public static create(properties?: google.cloud.datacatalog.v1.DatabaseTableSpec.IDatabaseViewSpec): google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec; + + /** + * Encodes the specified DatabaseViewSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.verify|verify} messages. + * @param message DatabaseViewSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.DatabaseTableSpec.IDatabaseViewSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatabaseViewSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.verify|verify} messages. + * @param message DatabaseViewSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.DatabaseTableSpec.IDatabaseViewSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatabaseViewSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatabaseViewSpec + * @throws {Error} If the payload is not a 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.DatabaseViewSpec; + + /** + * Decodes a DatabaseViewSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatabaseViewSpec + * @throws {Error} If the payload is 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.DatabaseViewSpec; + + /** + * Verifies a DatabaseViewSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DatabaseViewSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatabaseViewSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec; + + /** + * Creates a plain object from a DatabaseViewSpec message. Also converts values to other types if specified. + * @param message DatabaseViewSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatabaseViewSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatabaseViewSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DatabaseViewSpec { + + /** ViewType enum. */ + enum ViewType { + VIEW_TYPE_UNSPECIFIED = 0, + STANDARD_VIEW = 1, + MATERIALIZED_VIEW = 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 DatasetSpec. */ + interface IDatasetSpec { + + /** DatasetSpec vertexDatasetSpec */ + vertexDatasetSpec?: (google.cloud.datacatalog.v1.IVertexDatasetSpec|null); + } + + /** Represents a DatasetSpec. */ + class DatasetSpec implements IDatasetSpec { + + /** + * Constructs a new DatasetSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.IDatasetSpec); + + /** DatasetSpec vertexDatasetSpec. */ + public vertexDatasetSpec?: (google.cloud.datacatalog.v1.IVertexDatasetSpec|null); + + /** DatasetSpec systemSpec. */ + public systemSpec?: "vertexDatasetSpec"; + + /** + * Creates a new DatasetSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns DatasetSpec instance + */ + public static create(properties?: google.cloud.datacatalog.v1.IDatasetSpec): google.cloud.datacatalog.v1.DatasetSpec; + + /** + * Encodes the specified DatasetSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.DatasetSpec.verify|verify} messages. + * @param message DatasetSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.IDatasetSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatasetSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DatasetSpec.verify|verify} messages. + * @param message DatasetSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.IDatasetSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatasetSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatasetSpec + * @throws {Error} If the payload is not a 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.DatasetSpec; + + /** + * Decodes a DatasetSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatasetSpec + * @throws {Error} If the payload is 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.DatasetSpec; + + /** + * Verifies a DatasetSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DatasetSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatasetSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.DatasetSpec; + + /** + * Creates a plain object from a DatasetSpec message. Also converts values to other types if specified. + * @param message DatasetSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.DatasetSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatasetSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatasetSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SqlDatabaseSystemSpec. */ + interface ISqlDatabaseSystemSpec { + + /** SqlDatabaseSystemSpec sqlEngine */ + sqlEngine?: (string|null); + + /** SqlDatabaseSystemSpec databaseVersion */ + databaseVersion?: (string|null); + + /** SqlDatabaseSystemSpec instanceHost */ + instanceHost?: (string|null); + } + + /** Represents a SqlDatabaseSystemSpec. */ + class SqlDatabaseSystemSpec implements ISqlDatabaseSystemSpec { + + /** + * Constructs a new SqlDatabaseSystemSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.ISqlDatabaseSystemSpec); + + /** SqlDatabaseSystemSpec sqlEngine. */ + public sqlEngine: string; + + /** SqlDatabaseSystemSpec databaseVersion. */ + public databaseVersion: string; + + /** SqlDatabaseSystemSpec instanceHost. */ + public instanceHost: string; + + /** + * Creates a new SqlDatabaseSystemSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns SqlDatabaseSystemSpec instance + */ + public static create(properties?: google.cloud.datacatalog.v1.ISqlDatabaseSystemSpec): google.cloud.datacatalog.v1.SqlDatabaseSystemSpec; + + /** + * Encodes the specified SqlDatabaseSystemSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.SqlDatabaseSystemSpec.verify|verify} messages. + * @param message SqlDatabaseSystemSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.ISqlDatabaseSystemSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SqlDatabaseSystemSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.SqlDatabaseSystemSpec.verify|verify} messages. + * @param message SqlDatabaseSystemSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.ISqlDatabaseSystemSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SqlDatabaseSystemSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SqlDatabaseSystemSpec + * @throws {Error} If the payload is not a 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.SqlDatabaseSystemSpec; + + /** + * Decodes a SqlDatabaseSystemSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SqlDatabaseSystemSpec + * @throws {Error} If the payload is 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.SqlDatabaseSystemSpec; + + /** + * Verifies a SqlDatabaseSystemSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SqlDatabaseSystemSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SqlDatabaseSystemSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.SqlDatabaseSystemSpec; + + /** + * Creates a plain object from a SqlDatabaseSystemSpec message. Also converts values to other types if specified. + * @param message SqlDatabaseSystemSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.SqlDatabaseSystemSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SqlDatabaseSystemSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SqlDatabaseSystemSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LookerSystemSpec. */ + interface ILookerSystemSpec { + + /** LookerSystemSpec parentInstanceId */ + parentInstanceId?: (string|null); + + /** LookerSystemSpec parentInstanceDisplayName */ + parentInstanceDisplayName?: (string|null); + + /** LookerSystemSpec parentModelId */ + parentModelId?: (string|null); + + /** LookerSystemSpec parentModelDisplayName */ + parentModelDisplayName?: (string|null); + + /** LookerSystemSpec parentViewId */ + parentViewId?: (string|null); + + /** LookerSystemSpec parentViewDisplayName */ + parentViewDisplayName?: (string|null); + } + + /** Represents a LookerSystemSpec. */ + class LookerSystemSpec implements ILookerSystemSpec { + + /** + * Constructs a new LookerSystemSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.ILookerSystemSpec); + + /** LookerSystemSpec parentInstanceId. */ + public parentInstanceId: string; + + /** LookerSystemSpec parentInstanceDisplayName. */ + public parentInstanceDisplayName: string; + + /** LookerSystemSpec parentModelId. */ + public parentModelId: string; + + /** LookerSystemSpec parentModelDisplayName. */ + public parentModelDisplayName: string; + + /** LookerSystemSpec parentViewId. */ + public parentViewId: string; + + /** LookerSystemSpec parentViewDisplayName. */ + public parentViewDisplayName: string; + + /** + * Creates a new LookerSystemSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns LookerSystemSpec instance + */ + public static create(properties?: google.cloud.datacatalog.v1.ILookerSystemSpec): google.cloud.datacatalog.v1.LookerSystemSpec; + + /** + * Encodes the specified LookerSystemSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.LookerSystemSpec.verify|verify} messages. + * @param message LookerSystemSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.ILookerSystemSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LookerSystemSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.LookerSystemSpec.verify|verify} messages. + * @param message LookerSystemSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.ILookerSystemSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LookerSystemSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LookerSystemSpec + * @throws {Error} If the payload is not a 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.LookerSystemSpec; + + /** + * Decodes a LookerSystemSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LookerSystemSpec + * @throws {Error} If the payload is 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.LookerSystemSpec; + + /** + * Verifies a LookerSystemSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LookerSystemSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LookerSystemSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.LookerSystemSpec; + + /** + * Creates a plain object from a LookerSystemSpec message. Also converts values to other types if specified. + * @param message LookerSystemSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.LookerSystemSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LookerSystemSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LookerSystemSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudBigtableSystemSpec. */ + interface ICloudBigtableSystemSpec { + + /** CloudBigtableSystemSpec instanceDisplayName */ + instanceDisplayName?: (string|null); + } + + /** Represents a CloudBigtableSystemSpec. */ + class CloudBigtableSystemSpec implements ICloudBigtableSystemSpec { + + /** + * Constructs a new CloudBigtableSystemSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.ICloudBigtableSystemSpec); + + /** CloudBigtableSystemSpec instanceDisplayName. */ + public instanceDisplayName: string; + + /** + * Creates a new CloudBigtableSystemSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudBigtableSystemSpec instance + */ + public static create(properties?: google.cloud.datacatalog.v1.ICloudBigtableSystemSpec): google.cloud.datacatalog.v1.CloudBigtableSystemSpec; + + /** + * Encodes the specified CloudBigtableSystemSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.CloudBigtableSystemSpec.verify|verify} messages. + * @param message CloudBigtableSystemSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.ICloudBigtableSystemSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudBigtableSystemSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CloudBigtableSystemSpec.verify|verify} messages. + * @param message CloudBigtableSystemSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.ICloudBigtableSystemSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudBigtableSystemSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudBigtableSystemSpec + * @throws {Error} If the payload is not a 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.CloudBigtableSystemSpec; + + /** + * Decodes a CloudBigtableSystemSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudBigtableSystemSpec + * @throws {Error} If the payload is 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.CloudBigtableSystemSpec; + + /** + * Verifies a CloudBigtableSystemSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudBigtableSystemSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudBigtableSystemSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.CloudBigtableSystemSpec; + + /** + * Creates a plain object from a CloudBigtableSystemSpec message. Also converts values to other types if specified. + * @param message CloudBigtableSystemSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.CloudBigtableSystemSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudBigtableSystemSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudBigtableSystemSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudBigtableInstanceSpec. */ + interface ICloudBigtableInstanceSpec { + + /** CloudBigtableInstanceSpec cloudBigtableClusterSpecs */ + cloudBigtableClusterSpecs?: (google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.ICloudBigtableClusterSpec[]|null); + } + + /** Represents a CloudBigtableInstanceSpec. */ + class CloudBigtableInstanceSpec implements ICloudBigtableInstanceSpec { + + /** + * Constructs a new CloudBigtableInstanceSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.ICloudBigtableInstanceSpec); + + /** CloudBigtableInstanceSpec cloudBigtableClusterSpecs. */ + public cloudBigtableClusterSpecs: google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.ICloudBigtableClusterSpec[]; + + /** + * Creates a new CloudBigtableInstanceSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudBigtableInstanceSpec instance + */ + public static create(properties?: google.cloud.datacatalog.v1.ICloudBigtableInstanceSpec): google.cloud.datacatalog.v1.CloudBigtableInstanceSpec; + + /** + * Encodes the specified CloudBigtableInstanceSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.verify|verify} messages. + * @param message CloudBigtableInstanceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.ICloudBigtableInstanceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudBigtableInstanceSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.verify|verify} messages. + * @param message CloudBigtableInstanceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.ICloudBigtableInstanceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudBigtableInstanceSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudBigtableInstanceSpec + * @throws {Error} If the payload is not a 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.CloudBigtableInstanceSpec; + + /** + * Decodes a CloudBigtableInstanceSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudBigtableInstanceSpec + * @throws {Error} If the payload is 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.CloudBigtableInstanceSpec; + + /** + * Verifies a CloudBigtableInstanceSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudBigtableInstanceSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudBigtableInstanceSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.CloudBigtableInstanceSpec; + + /** + * Creates a plain object from a CloudBigtableInstanceSpec message. Also converts values to other types if specified. + * @param message CloudBigtableInstanceSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.CloudBigtableInstanceSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudBigtableInstanceSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudBigtableInstanceSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CloudBigtableInstanceSpec { + + /** Properties of a CloudBigtableClusterSpec. */ + interface ICloudBigtableClusterSpec { + + /** CloudBigtableClusterSpec displayName */ + displayName?: (string|null); + + /** CloudBigtableClusterSpec location */ + location?: (string|null); + + /** CloudBigtableClusterSpec type */ + type?: (string|null); + + /** CloudBigtableClusterSpec linkedResource */ + linkedResource?: (string|null); + } + + /** Represents a CloudBigtableClusterSpec. */ + class CloudBigtableClusterSpec implements ICloudBigtableClusterSpec { + + /** + * Constructs a new CloudBigtableClusterSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.ICloudBigtableClusterSpec); + + /** CloudBigtableClusterSpec displayName. */ + public displayName: string; + + /** CloudBigtableClusterSpec location. */ + public location: string; + + /** CloudBigtableClusterSpec type. */ + public type: string; + + /** CloudBigtableClusterSpec linkedResource. */ + public linkedResource: string; + + /** + * Creates a new CloudBigtableClusterSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudBigtableClusterSpec instance + */ + public static create(properties?: google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.ICloudBigtableClusterSpec): google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec; + + /** + * Encodes the specified CloudBigtableClusterSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec.verify|verify} messages. + * @param message CloudBigtableClusterSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.ICloudBigtableClusterSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudBigtableClusterSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec.verify|verify} messages. + * @param message CloudBigtableClusterSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.ICloudBigtableClusterSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudBigtableClusterSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudBigtableClusterSpec + * @throws {Error} If the payload is not a 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.CloudBigtableInstanceSpec.CloudBigtableClusterSpec; + + /** + * Decodes a CloudBigtableClusterSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudBigtableClusterSpec + * @throws {Error} If the payload is 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.CloudBigtableInstanceSpec.CloudBigtableClusterSpec; + + /** + * Verifies a CloudBigtableClusterSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudBigtableClusterSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudBigtableClusterSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec; + + /** + * Creates a plain object from a CloudBigtableClusterSpec message. Also converts values to other types if specified. + * @param message CloudBigtableClusterSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudBigtableClusterSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudBigtableClusterSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ServiceSpec. */ + interface IServiceSpec { + + /** ServiceSpec cloudBigtableInstanceSpec */ + cloudBigtableInstanceSpec?: (google.cloud.datacatalog.v1.ICloudBigtableInstanceSpec|null); + } + + /** Represents a ServiceSpec. */ + class ServiceSpec implements IServiceSpec { + + /** + * Constructs a new ServiceSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.IServiceSpec); + + /** ServiceSpec cloudBigtableInstanceSpec. */ + public cloudBigtableInstanceSpec?: (google.cloud.datacatalog.v1.ICloudBigtableInstanceSpec|null); + + /** ServiceSpec systemSpec. */ + public systemSpec?: "cloudBigtableInstanceSpec"; + + /** + * Creates a new ServiceSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceSpec instance + */ + public static create(properties?: google.cloud.datacatalog.v1.IServiceSpec): google.cloud.datacatalog.v1.ServiceSpec; + + /** + * Encodes the specified ServiceSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.ServiceSpec.verify|verify} messages. + * @param message ServiceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.IServiceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ServiceSpec.verify|verify} messages. + * @param message ServiceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.IServiceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceSpec + * @throws {Error} If the payload is not a 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.ServiceSpec; + + /** + * Decodes a ServiceSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceSpec + * @throws {Error} If the payload is 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.ServiceSpec; + + /** + * Verifies a ServiceSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ServiceSpec; + + /** + * Creates a plain object from a ServiceSpec message. Also converts values to other types if specified. + * @param message ServiceSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.ServiceSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VertexModelSourceInfo. */ + interface IVertexModelSourceInfo { + + /** VertexModelSourceInfo sourceType */ + sourceType?: (google.cloud.datacatalog.v1.VertexModelSourceInfo.ModelSourceType|keyof typeof google.cloud.datacatalog.v1.VertexModelSourceInfo.ModelSourceType|null); + + /** VertexModelSourceInfo copy */ + copy?: (boolean|null); + } + + /** Represents a VertexModelSourceInfo. */ + class VertexModelSourceInfo implements IVertexModelSourceInfo { + + /** + * Constructs a new VertexModelSourceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.IVertexModelSourceInfo); + + /** VertexModelSourceInfo sourceType. */ + public sourceType: (google.cloud.datacatalog.v1.VertexModelSourceInfo.ModelSourceType|keyof typeof google.cloud.datacatalog.v1.VertexModelSourceInfo.ModelSourceType); + + /** VertexModelSourceInfo copy. */ + public copy: boolean; + + /** + * Creates a new VertexModelSourceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns VertexModelSourceInfo instance + */ + public static create(properties?: google.cloud.datacatalog.v1.IVertexModelSourceInfo): google.cloud.datacatalog.v1.VertexModelSourceInfo; + + /** + * Encodes the specified VertexModelSourceInfo message. Does not implicitly {@link google.cloud.datacatalog.v1.VertexModelSourceInfo.verify|verify} messages. + * @param message VertexModelSourceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.IVertexModelSourceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VertexModelSourceInfo message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.VertexModelSourceInfo.verify|verify} messages. + * @param message VertexModelSourceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.IVertexModelSourceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VertexModelSourceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VertexModelSourceInfo + * @throws {Error} If the payload is not a 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.VertexModelSourceInfo; + + /** + * Decodes a VertexModelSourceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VertexModelSourceInfo + * @throws {Error} If the payload is 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.VertexModelSourceInfo; + + /** + * Verifies a VertexModelSourceInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VertexModelSourceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VertexModelSourceInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.VertexModelSourceInfo; + + /** + * Creates a plain object from a VertexModelSourceInfo message. Also converts values to other types if specified. + * @param message VertexModelSourceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.VertexModelSourceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VertexModelSourceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VertexModelSourceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VertexModelSourceInfo { + + /** ModelSourceType enum. */ + enum ModelSourceType { + MODEL_SOURCE_TYPE_UNSPECIFIED = 0, + AUTOML = 1, + CUSTOM = 2, + BQML = 3, + MODEL_GARDEN = 4, + GENIE = 5, + CUSTOM_TEXT_EMBEDDING = 6, + MARKETPLACE = 7 + } + } + + /** Properties of a VertexModelSpec. */ + interface IVertexModelSpec { + + /** VertexModelSpec versionId */ + versionId?: (string|null); + + /** VertexModelSpec versionAliases */ + versionAliases?: (string[]|null); + + /** VertexModelSpec versionDescription */ + versionDescription?: (string|null); + + /** VertexModelSpec vertexModelSourceInfo */ + vertexModelSourceInfo?: (google.cloud.datacatalog.v1.IVertexModelSourceInfo|null); + + /** VertexModelSpec containerImageUri */ + containerImageUri?: (string|null); + } + + /** Represents a VertexModelSpec. */ + class VertexModelSpec implements IVertexModelSpec { + + /** + * Constructs a new VertexModelSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.IVertexModelSpec); + + /** VertexModelSpec versionId. */ + public versionId: string; + + /** VertexModelSpec versionAliases. */ + public versionAliases: string[]; + + /** VertexModelSpec versionDescription. */ + public versionDescription: string; + + /** VertexModelSpec vertexModelSourceInfo. */ + public vertexModelSourceInfo?: (google.cloud.datacatalog.v1.IVertexModelSourceInfo|null); + + /** VertexModelSpec containerImageUri. */ + public containerImageUri: string; + + /** + * Creates a new VertexModelSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns VertexModelSpec instance + */ + public static create(properties?: google.cloud.datacatalog.v1.IVertexModelSpec): google.cloud.datacatalog.v1.VertexModelSpec; + + /** + * Encodes the specified VertexModelSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.VertexModelSpec.verify|verify} messages. + * @param message VertexModelSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.IVertexModelSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VertexModelSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.VertexModelSpec.verify|verify} messages. + * @param message VertexModelSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.IVertexModelSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VertexModelSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VertexModelSpec + * @throws {Error} If the payload is not a 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.VertexModelSpec; + + /** + * Decodes a VertexModelSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VertexModelSpec + * @throws {Error} If the payload is 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.VertexModelSpec; + + /** + * Verifies a VertexModelSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VertexModelSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VertexModelSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.VertexModelSpec; + + /** + * Creates a plain object from a VertexModelSpec message. Also converts values to other types if specified. + * @param message VertexModelSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.VertexModelSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VertexModelSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VertexModelSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VertexDatasetSpec. */ + interface IVertexDatasetSpec { + + /** VertexDatasetSpec dataItemCount */ + dataItemCount?: (number|Long|string|null); + + /** VertexDatasetSpec dataType */ + dataType?: (google.cloud.datacatalog.v1.VertexDatasetSpec.DataType|keyof typeof google.cloud.datacatalog.v1.VertexDatasetSpec.DataType|null); + } + + /** Represents a VertexDatasetSpec. */ + class VertexDatasetSpec implements IVertexDatasetSpec { + + /** + * Constructs a new VertexDatasetSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.IVertexDatasetSpec); + + /** VertexDatasetSpec dataItemCount. */ + public dataItemCount: (number|Long|string); + + /** VertexDatasetSpec dataType. */ + public dataType: (google.cloud.datacatalog.v1.VertexDatasetSpec.DataType|keyof typeof google.cloud.datacatalog.v1.VertexDatasetSpec.DataType); + + /** + * Creates a new VertexDatasetSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns VertexDatasetSpec instance + */ + public static create(properties?: google.cloud.datacatalog.v1.IVertexDatasetSpec): google.cloud.datacatalog.v1.VertexDatasetSpec; + + /** + * Encodes the specified VertexDatasetSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.VertexDatasetSpec.verify|verify} messages. + * @param message VertexDatasetSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.IVertexDatasetSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VertexDatasetSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.VertexDatasetSpec.verify|verify} messages. + * @param message VertexDatasetSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.IVertexDatasetSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VertexDatasetSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VertexDatasetSpec + * @throws {Error} If the payload is not a 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.VertexDatasetSpec; + + /** + * Decodes a VertexDatasetSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VertexDatasetSpec + * @throws {Error} If the payload is 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.VertexDatasetSpec; + + /** + * Verifies a VertexDatasetSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VertexDatasetSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VertexDatasetSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.VertexDatasetSpec; + + /** + * Creates a plain object from a VertexDatasetSpec message. Also converts values to other types if specified. + * @param message VertexDatasetSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.VertexDatasetSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VertexDatasetSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VertexDatasetSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VertexDatasetSpec { + + /** DataType enum. */ + enum DataType { + DATA_TYPE_UNSPECIFIED = 0, + TABLE = 1, + IMAGE = 2, + TEXT = 3, + VIDEO = 4, + CONVERSATION = 5, + TIME_SERIES = 6, + DOCUMENT = 7, + TEXT_TO_SPEECH = 8, + TRANSLATION = 9, + STORE_VISION = 10, + ENTERPRISE_KNOWLEDGE_GRAPH = 11, + TEXT_PROMPT = 12 + } + } + + /** Properties of a ModelSpec. */ + interface IModelSpec { + + /** ModelSpec vertexModelSpec */ + vertexModelSpec?: (google.cloud.datacatalog.v1.IVertexModelSpec|null); + } + + /** Represents a ModelSpec. */ + class ModelSpec implements IModelSpec { + + /** + * Constructs a new ModelSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.IModelSpec); + + /** ModelSpec vertexModelSpec. */ + public vertexModelSpec?: (google.cloud.datacatalog.v1.IVertexModelSpec|null); + + /** ModelSpec systemSpec. */ + public systemSpec?: "vertexModelSpec"; + + /** + * Creates a new ModelSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ModelSpec instance + */ + public static create(properties?: google.cloud.datacatalog.v1.IModelSpec): google.cloud.datacatalog.v1.ModelSpec; + + /** + * Encodes the specified ModelSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.ModelSpec.verify|verify} messages. + * @param message ModelSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.IModelSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ModelSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ModelSpec.verify|verify} messages. + * @param message ModelSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.IModelSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ModelSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ModelSpec + * @throws {Error} If the payload is not a 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.ModelSpec; + + /** + * Decodes a ModelSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ModelSpec + * @throws {Error} If the payload is 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.ModelSpec; + + /** + * Verifies a ModelSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ModelSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ModelSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ModelSpec; + + /** + * Creates a plain object from a ModelSpec message. Also converts values to other types if specified. + * @param message ModelSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.ModelSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ModelSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ModelSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FeatureOnlineStoreSpec. */ + interface IFeatureOnlineStoreSpec { + + /** FeatureOnlineStoreSpec storageType */ + storageType?: (google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.StorageType|keyof typeof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.StorageType|null); + } + + /** Represents a FeatureOnlineStoreSpec. */ + class FeatureOnlineStoreSpec implements IFeatureOnlineStoreSpec { + + /** + * Constructs a new FeatureOnlineStoreSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.IFeatureOnlineStoreSpec); + + /** FeatureOnlineStoreSpec storageType. */ + public storageType: (google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.StorageType|keyof typeof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.StorageType); + + /** + * Creates a new FeatureOnlineStoreSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureOnlineStoreSpec instance + */ + public static create(properties?: google.cloud.datacatalog.v1.IFeatureOnlineStoreSpec): google.cloud.datacatalog.v1.FeatureOnlineStoreSpec; + + /** + * Encodes the specified FeatureOnlineStoreSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.verify|verify} messages. + * @param message FeatureOnlineStoreSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.IFeatureOnlineStoreSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureOnlineStoreSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.verify|verify} messages. + * @param message FeatureOnlineStoreSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.IFeatureOnlineStoreSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureOnlineStoreSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureOnlineStoreSpec + * @throws {Error} If the payload is not a 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.FeatureOnlineStoreSpec; + + /** + * Decodes a FeatureOnlineStoreSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureOnlineStoreSpec + * @throws {Error} If the payload is 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.FeatureOnlineStoreSpec; + + /** + * Verifies a FeatureOnlineStoreSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureOnlineStoreSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureOnlineStoreSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.FeatureOnlineStoreSpec; + + /** + * Creates a plain object from a FeatureOnlineStoreSpec message. Also converts values to other types if specified. + * @param message FeatureOnlineStoreSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.FeatureOnlineStoreSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureOnlineStoreSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureOnlineStoreSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureOnlineStoreSpec { + + /** StorageType enum. */ + enum StorageType { + STORAGE_TYPE_UNSPECIFIED = 0, + BIGTABLE = 1, + OPTIMIZED = 2 + } + } + + /** 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); + + /** EntryGroup transferredToDataplex */ + transferredToDataplex?: (boolean|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); + + /** EntryGroup transferredToDataplex. */ + public transferredToDataplex: boolean; + + /** + * 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 ReconcileTagsRequest. */ + interface IReconcileTagsRequest { + + /** ReconcileTagsRequest parent */ + parent?: (string|null); + + /** ReconcileTagsRequest tagTemplate */ + tagTemplate?: (string|null); + + /** ReconcileTagsRequest forceDeleteMissing */ + forceDeleteMissing?: (boolean|null); + + /** ReconcileTagsRequest tags */ + tags?: (google.cloud.datacatalog.v1.ITag[]|null); + } + + /** Represents a ReconcileTagsRequest. */ + class ReconcileTagsRequest implements IReconcileTagsRequest { + + /** + * Constructs a new ReconcileTagsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.IReconcileTagsRequest); + + /** ReconcileTagsRequest parent. */ + public parent: string; + + /** ReconcileTagsRequest tagTemplate. */ + public tagTemplate: string; + + /** ReconcileTagsRequest forceDeleteMissing. */ + public forceDeleteMissing: boolean; + + /** ReconcileTagsRequest tags. */ + public tags: google.cloud.datacatalog.v1.ITag[]; + + /** + * Creates a new ReconcileTagsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReconcileTagsRequest instance + */ + public static create(properties?: google.cloud.datacatalog.v1.IReconcileTagsRequest): google.cloud.datacatalog.v1.ReconcileTagsRequest; + + /** + * Encodes the specified ReconcileTagsRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ReconcileTagsRequest.verify|verify} messages. + * @param message ReconcileTagsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.IReconcileTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReconcileTagsRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ReconcileTagsRequest.verify|verify} messages. + * @param message ReconcileTagsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.IReconcileTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReconcileTagsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReconcileTagsRequest + * @throws {Error} If the payload is not a 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.ReconcileTagsRequest; + + /** + * Decodes a ReconcileTagsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReconcileTagsRequest + * @throws {Error} If the payload is 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.ReconcileTagsRequest; + + /** + * Verifies a ReconcileTagsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReconcileTagsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReconcileTagsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ReconcileTagsRequest; + + /** + * Creates a plain object from a ReconcileTagsRequest message. Also converts values to other types if specified. + * @param message ReconcileTagsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.ReconcileTagsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReconcileTagsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReconcileTagsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReconcileTagsResponse. */ + interface IReconcileTagsResponse { + + /** ReconcileTagsResponse createdTagsCount */ + createdTagsCount?: (number|Long|string|null); + + /** ReconcileTagsResponse updatedTagsCount */ + updatedTagsCount?: (number|Long|string|null); + + /** ReconcileTagsResponse deletedTagsCount */ + deletedTagsCount?: (number|Long|string|null); + } + + /** Represents a ReconcileTagsResponse. */ + class ReconcileTagsResponse implements IReconcileTagsResponse { + + /** + * Constructs a new ReconcileTagsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.IReconcileTagsResponse); + + /** ReconcileTagsResponse createdTagsCount. */ + public createdTagsCount: (number|Long|string); + + /** ReconcileTagsResponse updatedTagsCount. */ + public updatedTagsCount: (number|Long|string); + + /** ReconcileTagsResponse deletedTagsCount. */ + public deletedTagsCount: (number|Long|string); + + /** + * Creates a new ReconcileTagsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ReconcileTagsResponse instance + */ + public static create(properties?: google.cloud.datacatalog.v1.IReconcileTagsResponse): google.cloud.datacatalog.v1.ReconcileTagsResponse; + + /** + * Encodes the specified ReconcileTagsResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.ReconcileTagsResponse.verify|verify} messages. + * @param message ReconcileTagsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.IReconcileTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReconcileTagsResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ReconcileTagsResponse.verify|verify} messages. + * @param message ReconcileTagsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.IReconcileTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReconcileTagsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReconcileTagsResponse + * @throws {Error} If the payload is not a 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.ReconcileTagsResponse; + + /** + * Decodes a ReconcileTagsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReconcileTagsResponse + * @throws {Error} If the payload is 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.ReconcileTagsResponse; + + /** + * Verifies a ReconcileTagsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReconcileTagsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReconcileTagsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ReconcileTagsResponse; + + /** + * Creates a plain object from a ReconcileTagsResponse message. Also converts values to other types if specified. + * @param message ReconcileTagsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.ReconcileTagsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReconcileTagsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReconcileTagsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReconcileTagsMetadata. */ + interface IReconcileTagsMetadata { + + /** ReconcileTagsMetadata state */ + state?: (google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState|keyof typeof google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState|null); + + /** ReconcileTagsMetadata errors */ + errors?: ({ [k: string]: google.rpc.IStatus }|null); + } + + /** Represents a ReconcileTagsMetadata. */ + class ReconcileTagsMetadata implements IReconcileTagsMetadata { + + /** + * Constructs a new ReconcileTagsMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.IReconcileTagsMetadata); + + /** ReconcileTagsMetadata state. */ + public state: (google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState|keyof typeof google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState); + + /** ReconcileTagsMetadata errors. */ + public errors: { [k: string]: google.rpc.IStatus }; + + /** + * Creates a new ReconcileTagsMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ReconcileTagsMetadata instance + */ + public static create(properties?: google.cloud.datacatalog.v1.IReconcileTagsMetadata): google.cloud.datacatalog.v1.ReconcileTagsMetadata; + + /** + * Encodes the specified ReconcileTagsMetadata message. Does not implicitly {@link google.cloud.datacatalog.v1.ReconcileTagsMetadata.verify|verify} messages. + * @param message ReconcileTagsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.IReconcileTagsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReconcileTagsMetadata message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ReconcileTagsMetadata.verify|verify} messages. + * @param message ReconcileTagsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.IReconcileTagsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReconcileTagsMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReconcileTagsMetadata + * @throws {Error} If the payload is not a 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.ReconcileTagsMetadata; + + /** + * Decodes a ReconcileTagsMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReconcileTagsMetadata + * @throws {Error} If the payload is 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.ReconcileTagsMetadata; + + /** + * Verifies a ReconcileTagsMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReconcileTagsMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReconcileTagsMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ReconcileTagsMetadata; + + /** + * Creates a plain object from a ReconcileTagsMetadata message. Also converts values to other types if specified. + * @param message ReconcileTagsMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.ReconcileTagsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReconcileTagsMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReconcileTagsMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReconcileTagsMetadata { + + /** ReconciliationState enum. */ + enum ReconciliationState { + RECONCILIATION_STATE_UNSPECIFIED = 0, + RECONCILIATION_QUEUED = 1, + RECONCILIATION_IN_PROGRESS = 2, + RECONCILIATION_DONE = 3 + } + } + + /** 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 an ImportEntriesRequest. */ + interface IImportEntriesRequest { + + /** ImportEntriesRequest parent */ + parent?: (string|null); + + /** ImportEntriesRequest gcsBucketPath */ + gcsBucketPath?: (string|null); + + /** ImportEntriesRequest jobId */ + jobId?: (string|null); + } + + /** Represents an ImportEntriesRequest. */ + class ImportEntriesRequest implements IImportEntriesRequest { + + /** + * Constructs a new ImportEntriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.IImportEntriesRequest); + + /** ImportEntriesRequest parent. */ + public parent: string; + + /** ImportEntriesRequest gcsBucketPath. */ + public gcsBucketPath?: (string|null); + + /** ImportEntriesRequest jobId. */ + public jobId: string; + + /** ImportEntriesRequest source. */ + public source?: "gcsBucketPath"; + + /** + * Creates a new ImportEntriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportEntriesRequest instance + */ + public static create(properties?: google.cloud.datacatalog.v1.IImportEntriesRequest): google.cloud.datacatalog.v1.ImportEntriesRequest; + + /** + * Encodes the specified ImportEntriesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ImportEntriesRequest.verify|verify} messages. + * @param message ImportEntriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.IImportEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ImportEntriesRequest.verify|verify} messages. + * @param message ImportEntriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.IImportEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportEntriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportEntriesRequest + * @throws {Error} If the payload is not a 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.ImportEntriesRequest; + + /** + * Decodes an ImportEntriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportEntriesRequest + * @throws {Error} If the payload is 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.ImportEntriesRequest; + + /** + * Verifies an ImportEntriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImportEntriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportEntriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ImportEntriesRequest; + + /** + * Creates a plain object from an ImportEntriesRequest message. Also converts values to other types if specified. + * @param message ImportEntriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.ImportEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportEntriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportEntriesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportEntriesResponse. */ + interface IImportEntriesResponse { + + /** ImportEntriesResponse upsertedEntriesCount */ + upsertedEntriesCount?: (number|Long|string|null); + + /** ImportEntriesResponse deletedEntriesCount */ + deletedEntriesCount?: (number|Long|string|null); + } + + /** Represents an ImportEntriesResponse. */ + class ImportEntriesResponse implements IImportEntriesResponse { + + /** + * Constructs a new ImportEntriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.IImportEntriesResponse); + + /** ImportEntriesResponse upsertedEntriesCount. */ + public upsertedEntriesCount?: (number|Long|string|null); + + /** ImportEntriesResponse deletedEntriesCount. */ + public deletedEntriesCount?: (number|Long|string|null); + + /** ImportEntriesResponse _upsertedEntriesCount. */ + public _upsertedEntriesCount?: "upsertedEntriesCount"; + + /** ImportEntriesResponse _deletedEntriesCount. */ + public _deletedEntriesCount?: "deletedEntriesCount"; + + /** + * Creates a new ImportEntriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportEntriesResponse instance + */ + public static create(properties?: google.cloud.datacatalog.v1.IImportEntriesResponse): google.cloud.datacatalog.v1.ImportEntriesResponse; + + /** + * Encodes the specified ImportEntriesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.ImportEntriesResponse.verify|verify} messages. + * @param message ImportEntriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.IImportEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ImportEntriesResponse.verify|verify} messages. + * @param message ImportEntriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.IImportEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportEntriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportEntriesResponse + * @throws {Error} If the payload is not a 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.ImportEntriesResponse; + + /** + * Decodes an ImportEntriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportEntriesResponse + * @throws {Error} If the payload is 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.ImportEntriesResponse; + + /** + * Verifies an ImportEntriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImportEntriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportEntriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ImportEntriesResponse; + + /** + * Creates a plain object from an ImportEntriesResponse message. Also converts values to other types if specified. + * @param message ImportEntriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.ImportEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportEntriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportEntriesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportEntriesMetadata. */ + interface IImportEntriesMetadata { + + /** ImportEntriesMetadata state */ + state?: (google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState|keyof typeof google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState|null); + + /** ImportEntriesMetadata errors */ + errors?: (google.rpc.IStatus[]|null); + } + + /** Represents an ImportEntriesMetadata. */ + class ImportEntriesMetadata implements IImportEntriesMetadata { + + /** + * Constructs a new ImportEntriesMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.IImportEntriesMetadata); + + /** ImportEntriesMetadata state. */ + public state: (google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState|keyof typeof google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState); + + /** ImportEntriesMetadata errors. */ + public errors: google.rpc.IStatus[]; + + /** + * Creates a new ImportEntriesMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportEntriesMetadata instance + */ + public static create(properties?: google.cloud.datacatalog.v1.IImportEntriesMetadata): google.cloud.datacatalog.v1.ImportEntriesMetadata; + + /** + * Encodes the specified ImportEntriesMetadata message. Does not implicitly {@link google.cloud.datacatalog.v1.ImportEntriesMetadata.verify|verify} messages. + * @param message ImportEntriesMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.IImportEntriesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportEntriesMetadata message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ImportEntriesMetadata.verify|verify} messages. + * @param message ImportEntriesMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.IImportEntriesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportEntriesMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportEntriesMetadata + * @throws {Error} If the payload is not a 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.ImportEntriesMetadata; + + /** + * Decodes an ImportEntriesMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportEntriesMetadata + * @throws {Error} If the payload is 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.ImportEntriesMetadata; + + /** + * Verifies an ImportEntriesMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImportEntriesMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportEntriesMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ImportEntriesMetadata; + + /** + * Creates a plain object from an ImportEntriesMetadata message. Also converts values to other types if specified. + * @param message ImportEntriesMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.ImportEntriesMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportEntriesMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportEntriesMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ImportEntriesMetadata { + + /** ImportState enum. */ + enum ImportState { + IMPORT_STATE_UNSPECIFIED = 0, + IMPORT_QUEUED = 1, + IMPORT_IN_PROGRESS = 2, + IMPORT_DONE = 3, + IMPORT_OBSOLETE = 4 + } + } + + /** 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, + DATABASE_SCHEMA = 15, + DASHBOARD = 16, + EXPLORE = 17, + LOOK = 18, + FEATURE_ONLINE_STORE = 19, + FEATURE_VIEW = 20, + FEATURE_GROUP = 21 + } + + /** Properties of a SetConfigRequest. */ + interface ISetConfigRequest { + + /** SetConfigRequest name */ + name?: (string|null); + + /** SetConfigRequest tagTemplateMigration */ + tagTemplateMigration?: (google.cloud.datacatalog.v1.TagTemplateMigration|keyof typeof google.cloud.datacatalog.v1.TagTemplateMigration|null); + + /** SetConfigRequest catalogUiExperience */ + catalogUiExperience?: (google.cloud.datacatalog.v1.CatalogUIExperience|keyof typeof google.cloud.datacatalog.v1.CatalogUIExperience|null); + } + + /** Represents a SetConfigRequest. */ + class SetConfigRequest implements ISetConfigRequest { + + /** + * Constructs a new SetConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.ISetConfigRequest); + + /** SetConfigRequest name. */ + public name: string; + + /** SetConfigRequest tagTemplateMigration. */ + public tagTemplateMigration?: (google.cloud.datacatalog.v1.TagTemplateMigration|keyof typeof google.cloud.datacatalog.v1.TagTemplateMigration|null); + + /** SetConfigRequest catalogUiExperience. */ + public catalogUiExperience?: (google.cloud.datacatalog.v1.CatalogUIExperience|keyof typeof google.cloud.datacatalog.v1.CatalogUIExperience|null); + + /** SetConfigRequest configuration. */ + public configuration?: ("tagTemplateMigration"|"catalogUiExperience"); + + /** + * Creates a new SetConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetConfigRequest instance + */ + public static create(properties?: google.cloud.datacatalog.v1.ISetConfigRequest): google.cloud.datacatalog.v1.SetConfigRequest; + + /** + * Encodes the specified SetConfigRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.SetConfigRequest.verify|verify} messages. + * @param message SetConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.ISetConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetConfigRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.SetConfigRequest.verify|verify} messages. + * @param message SetConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.ISetConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetConfigRequest + * @throws {Error} If the payload is not a 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.SetConfigRequest; + + /** + * Decodes a SetConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetConfigRequest + * @throws {Error} If the payload is 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.SetConfigRequest; + + /** + * Verifies a SetConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.SetConfigRequest; + + /** + * Creates a plain object from a SetConfigRequest message. Also converts values to other types if specified. + * @param message SetConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.SetConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RetrieveConfigRequest. */ + interface IRetrieveConfigRequest { + + /** RetrieveConfigRequest name */ + name?: (string|null); + } + + /** Represents a RetrieveConfigRequest. */ + class RetrieveConfigRequest implements IRetrieveConfigRequest { + + /** + * Constructs a new RetrieveConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.IRetrieveConfigRequest); + + /** RetrieveConfigRequest name. */ + public name: string; + + /** + * Creates a new RetrieveConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RetrieveConfigRequest instance + */ + public static create(properties?: google.cloud.datacatalog.v1.IRetrieveConfigRequest): google.cloud.datacatalog.v1.RetrieveConfigRequest; + + /** + * Encodes the specified RetrieveConfigRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.RetrieveConfigRequest.verify|verify} messages. + * @param message RetrieveConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.IRetrieveConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RetrieveConfigRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.RetrieveConfigRequest.verify|verify} messages. + * @param message RetrieveConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.IRetrieveConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RetrieveConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RetrieveConfigRequest + * @throws {Error} If the payload is not a 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.RetrieveConfigRequest; + + /** + * Decodes a RetrieveConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RetrieveConfigRequest + * @throws {Error} If the payload is 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.RetrieveConfigRequest; + + /** + * Verifies a RetrieveConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RetrieveConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RetrieveConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.RetrieveConfigRequest; + + /** + * Creates a plain object from a RetrieveConfigRequest message. Also converts values to other types if specified. + * @param message RetrieveConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.RetrieveConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RetrieveConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RetrieveConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RetrieveEffectiveConfigRequest. */ + interface IRetrieveEffectiveConfigRequest { + + /** RetrieveEffectiveConfigRequest name */ + name?: (string|null); + } + + /** Represents a RetrieveEffectiveConfigRequest. */ + class RetrieveEffectiveConfigRequest implements IRetrieveEffectiveConfigRequest { + + /** + * Constructs a new RetrieveEffectiveConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest); + + /** RetrieveEffectiveConfigRequest name. */ + public name: string; + + /** + * Creates a new RetrieveEffectiveConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RetrieveEffectiveConfigRequest instance + */ + public static create(properties?: google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest): google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest; + + /** + * Encodes the specified RetrieveEffectiveConfigRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest.verify|verify} messages. + * @param message RetrieveEffectiveConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RetrieveEffectiveConfigRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest.verify|verify} messages. + * @param message RetrieveEffectiveConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RetrieveEffectiveConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RetrieveEffectiveConfigRequest + * @throws {Error} If the payload is not a 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.RetrieveEffectiveConfigRequest; + + /** + * Decodes a RetrieveEffectiveConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RetrieveEffectiveConfigRequest + * @throws {Error} If the payload is 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.RetrieveEffectiveConfigRequest; + + /** + * Verifies a RetrieveEffectiveConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RetrieveEffectiveConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RetrieveEffectiveConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest; + + /** + * Creates a plain object from a RetrieveEffectiveConfigRequest message. Also converts values to other types if specified. + * @param message RetrieveEffectiveConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RetrieveEffectiveConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RetrieveEffectiveConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** TagTemplateMigration enum. */ + enum TagTemplateMigration { + TAG_TEMPLATE_MIGRATION_UNSPECIFIED = 0, + TAG_TEMPLATE_MIGRATION_ENABLED = 1, + TAG_TEMPLATE_MIGRATION_DISABLED = 2 + } + + /** CatalogUIExperience enum. */ + enum CatalogUIExperience { + CATALOG_UI_EXPERIENCE_UNSPECIFIED = 0, + CATALOG_UI_EXPERIENCE_ENABLED = 1, + CATALOG_UI_EXPERIENCE_DISABLED = 2 + } + + /** Properties of an OrganizationConfig. */ + interface IOrganizationConfig { + + /** OrganizationConfig config */ + config?: ({ [k: string]: google.cloud.datacatalog.v1.IMigrationConfig }|null); + } + + /** Represents an OrganizationConfig. */ + class OrganizationConfig implements IOrganizationConfig { + + /** + * Constructs a new OrganizationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.IOrganizationConfig); + + /** OrganizationConfig config. */ + public config: { [k: string]: google.cloud.datacatalog.v1.IMigrationConfig }; + + /** + * Creates a new OrganizationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns OrganizationConfig instance + */ + public static create(properties?: google.cloud.datacatalog.v1.IOrganizationConfig): google.cloud.datacatalog.v1.OrganizationConfig; + + /** + * Encodes the specified OrganizationConfig message. Does not implicitly {@link google.cloud.datacatalog.v1.OrganizationConfig.verify|verify} messages. + * @param message OrganizationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.IOrganizationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OrganizationConfig message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.OrganizationConfig.verify|verify} messages. + * @param message OrganizationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.IOrganizationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OrganizationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OrganizationConfig + * @throws {Error} If the payload is not a 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.OrganizationConfig; + + /** + * Decodes an OrganizationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OrganizationConfig + * @throws {Error} If the payload is 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.OrganizationConfig; + + /** + * Verifies an OrganizationConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OrganizationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OrganizationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.OrganizationConfig; + + /** + * Creates a plain object from an OrganizationConfig message. Also converts values to other types if specified. + * @param message OrganizationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.OrganizationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OrganizationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OrganizationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MigrationConfig. */ + interface IMigrationConfig { + + /** MigrationConfig tagTemplateMigration */ + tagTemplateMigration?: (google.cloud.datacatalog.v1.TagTemplateMigration|keyof typeof google.cloud.datacatalog.v1.TagTemplateMigration|null); + + /** MigrationConfig catalogUiExperience */ + catalogUiExperience?: (google.cloud.datacatalog.v1.CatalogUIExperience|keyof typeof google.cloud.datacatalog.v1.CatalogUIExperience|null); + } + + /** Represents a MigrationConfig. */ + class MigrationConfig implements IMigrationConfig { + + /** + * Constructs a new MigrationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.IMigrationConfig); + + /** MigrationConfig tagTemplateMigration. */ + public tagTemplateMigration: (google.cloud.datacatalog.v1.TagTemplateMigration|keyof typeof google.cloud.datacatalog.v1.TagTemplateMigration); + + /** MigrationConfig catalogUiExperience. */ + public catalogUiExperience: (google.cloud.datacatalog.v1.CatalogUIExperience|keyof typeof google.cloud.datacatalog.v1.CatalogUIExperience); + + /** + * Creates a new MigrationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns MigrationConfig instance + */ + public static create(properties?: google.cloud.datacatalog.v1.IMigrationConfig): google.cloud.datacatalog.v1.MigrationConfig; + + /** + * Encodes the specified MigrationConfig message. Does not implicitly {@link google.cloud.datacatalog.v1.MigrationConfig.verify|verify} messages. + * @param message MigrationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.IMigrationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MigrationConfig message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.MigrationConfig.verify|verify} messages. + * @param message MigrationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.IMigrationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MigrationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MigrationConfig + * @throws {Error} If the payload is not a 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.MigrationConfig; + + /** + * Decodes a MigrationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MigrationConfig + * @throws {Error} If the payload is 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.MigrationConfig; + + /** + * Verifies a MigrationConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MigrationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MigrationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.MigrationConfig; + + /** + * Creates a plain object from a MigrationConfig message. Also converts values to other types if specified. + * @param message MigrationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.MigrationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MigrationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MigrationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** 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 defaultValue */ + defaultValue?: (string|null); + + /** ColumnSchema ordinalPosition */ + ordinalPosition?: (number|null); + + /** ColumnSchema highestIndexingType */ + highestIndexingType?: (google.cloud.datacatalog.v1.ColumnSchema.IndexingType|keyof typeof google.cloud.datacatalog.v1.ColumnSchema.IndexingType|null); + + /** ColumnSchema subcolumns */ + subcolumns?: (google.cloud.datacatalog.v1.IColumnSchema[]|null); + + /** ColumnSchema lookerColumnSpec */ + lookerColumnSpec?: (google.cloud.datacatalog.v1.ColumnSchema.ILookerColumnSpec|null); + + /** ColumnSchema rangeElementType */ + rangeElementType?: (google.cloud.datacatalog.v1.ColumnSchema.IFieldElementType|null); + + /** ColumnSchema gcRule */ + gcRule?: (string|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 defaultValue. */ + public defaultValue: string; + + /** ColumnSchema ordinalPosition. */ + public ordinalPosition: number; + + /** ColumnSchema highestIndexingType. */ + public highestIndexingType: (google.cloud.datacatalog.v1.ColumnSchema.IndexingType|keyof typeof google.cloud.datacatalog.v1.ColumnSchema.IndexingType); + + /** ColumnSchema subcolumns. */ + public subcolumns: google.cloud.datacatalog.v1.IColumnSchema[]; + + /** ColumnSchema lookerColumnSpec. */ + public lookerColumnSpec?: (google.cloud.datacatalog.v1.ColumnSchema.ILookerColumnSpec|null); + + /** ColumnSchema rangeElementType. */ + public rangeElementType?: (google.cloud.datacatalog.v1.ColumnSchema.IFieldElementType|null); + + /** ColumnSchema gcRule. */ + public gcRule: string; + + /** ColumnSchema systemSpec. */ + public systemSpec?: "lookerColumnSpec"; + + /** + * 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; + } + + namespace ColumnSchema { + + /** IndexingType enum. */ + enum IndexingType { + INDEXING_TYPE_UNSPECIFIED = 0, + INDEXING_TYPE_NONE = 1, + INDEXING_TYPE_NON_UNIQUE = 2, + INDEXING_TYPE_UNIQUE = 3, + INDEXING_TYPE_PRIMARY_KEY = 4 + } + + /** Properties of a LookerColumnSpec. */ + interface ILookerColumnSpec { + + /** LookerColumnSpec type */ + type?: (google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType|keyof typeof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType|null); + } + + /** Represents a LookerColumnSpec. */ + class LookerColumnSpec implements ILookerColumnSpec { + + /** + * Constructs a new LookerColumnSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.ColumnSchema.ILookerColumnSpec); + + /** LookerColumnSpec type. */ + public type: (google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType|keyof typeof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType); + + /** + * Creates a new LookerColumnSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns LookerColumnSpec instance + */ + public static create(properties?: google.cloud.datacatalog.v1.ColumnSchema.ILookerColumnSpec): google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec; + + /** + * Encodes the specified LookerColumnSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.verify|verify} messages. + * @param message LookerColumnSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.ColumnSchema.ILookerColumnSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LookerColumnSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.verify|verify} messages. + * @param message LookerColumnSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.ColumnSchema.ILookerColumnSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LookerColumnSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LookerColumnSpec + * @throws {Error} If the payload is not a 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.LookerColumnSpec; + + /** + * Decodes a LookerColumnSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LookerColumnSpec + * @throws {Error} If the payload is 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.LookerColumnSpec; + + /** + * Verifies a LookerColumnSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LookerColumnSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LookerColumnSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec; + + /** + * Creates a plain object from a LookerColumnSpec message. Also converts values to other types if specified. + * @param message LookerColumnSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LookerColumnSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LookerColumnSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LookerColumnSpec { + + /** LookerColumnType enum. */ + enum LookerColumnType { + LOOKER_COLUMN_TYPE_UNSPECIFIED = 0, + DIMENSION = 1, + DIMENSION_GROUP = 2, + FILTER = 3, + MEASURE = 4, + PARAMETER = 5 + } + } + + /** Properties of a FieldElementType. */ + interface IFieldElementType { + + /** FieldElementType type */ + type?: (string|null); + } + + /** Represents a FieldElementType. */ + class FieldElementType implements IFieldElementType { + + /** + * Constructs a new FieldElementType. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.ColumnSchema.IFieldElementType); + + /** FieldElementType type. */ + public type: string; + + /** + * Creates a new FieldElementType instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldElementType instance + */ + public static create(properties?: google.cloud.datacatalog.v1.ColumnSchema.IFieldElementType): google.cloud.datacatalog.v1.ColumnSchema.FieldElementType; + + /** + * Encodes the specified FieldElementType message. Does not implicitly {@link google.cloud.datacatalog.v1.ColumnSchema.FieldElementType.verify|verify} messages. + * @param message FieldElementType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.ColumnSchema.IFieldElementType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldElementType message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ColumnSchema.FieldElementType.verify|verify} messages. + * @param message FieldElementType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.ColumnSchema.IFieldElementType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldElementType message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldElementType + * @throws {Error} If the payload is not a 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.FieldElementType; + + /** + * Decodes a FieldElementType message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldElementType + * @throws {Error} If the payload is 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.FieldElementType; + + /** + * Verifies a FieldElementType message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldElementType message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldElementType + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ColumnSchema.FieldElementType; + + /** + * Creates a plain object from a FieldElementType message. Also converts values to other types if specified. + * @param message FieldElementType + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.ColumnSchema.FieldElementType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldElementType to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldElementType + * @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); + + /** Tag dataplexTransferStatus */ + dataplexTransferStatus?: (google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus|keyof typeof google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus|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 dataplexTransferStatus. */ + public dataplexTransferStatus: (google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus|keyof typeof google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus); + + /** 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); + + /** TagTemplate dataplexTransferStatus */ + dataplexTransferStatus?: (google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus|keyof typeof google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus|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 }; + + /** TagTemplate dataplexTransferStatus. */ + public dataplexTransferStatus: (google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus|keyof typeof google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus); + + /** + * 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; + } + + namespace TagTemplate { + + /** DataplexTransferStatus enum. */ + enum DataplexTransferStatus { + DATAPLEX_TRANSFER_STATUS_UNSPECIFIED = 0, + MIGRATED = 1, + TRANSFERRED = 2 + } + } + + /** 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 CommonUsageStats. */ + interface ICommonUsageStats { + + /** CommonUsageStats viewCount */ + viewCount?: (number|Long|string|null); + } + + /** Represents a CommonUsageStats. */ + class CommonUsageStats implements ICommonUsageStats { + + /** + * Constructs a new CommonUsageStats. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.ICommonUsageStats); + + /** CommonUsageStats viewCount. */ + public viewCount?: (number|Long|string|null); + + /** CommonUsageStats _viewCount. */ + public _viewCount?: "viewCount"; + + /** + * Creates a new CommonUsageStats instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonUsageStats instance + */ + public static create(properties?: google.cloud.datacatalog.v1.ICommonUsageStats): google.cloud.datacatalog.v1.CommonUsageStats; + + /** + * Encodes the specified CommonUsageStats message. Does not implicitly {@link google.cloud.datacatalog.v1.CommonUsageStats.verify|verify} messages. + * @param message CommonUsageStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.ICommonUsageStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonUsageStats message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CommonUsageStats.verify|verify} messages. + * @param message CommonUsageStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.ICommonUsageStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonUsageStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonUsageStats + * @throws {Error} If the payload is not a 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.CommonUsageStats; + + /** + * Decodes a CommonUsageStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonUsageStats + * @throws {Error} If the payload is 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.CommonUsageStats; + + /** + * Verifies a CommonUsageStats message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommonUsageStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonUsageStats + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.CommonUsageStats; + + /** + * Creates a plain object from a CommonUsageStats message. Also converts values to other types if specified. + * @param message CommonUsageStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.CommonUsageStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonUsageStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonUsageStats + * @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); + + /** UsageSignal commonUsageWithinTimeRange */ + commonUsageWithinTimeRange?: ({ [k: string]: google.cloud.datacatalog.v1.ICommonUsageStats }|null); + + /** UsageSignal favoriteCount */ + favoriteCount?: (number|Long|string|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 }; + + /** UsageSignal commonUsageWithinTimeRange. */ + public commonUsageWithinTimeRange: { [k: string]: google.cloud.datacatalog.v1.ICommonUsageStats }; + + /** UsageSignal favoriteCount. */ + public favoriteCount?: (number|Long|string|null); + + /** UsageSignal _favoriteCount. */ + public _favoriteCount?: "favoriteCount"; + + /** + * 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; + } + + /** Properties of a TaggedEntry. */ + interface ITaggedEntry { + + /** TaggedEntry v1Entry */ + v1Entry?: (google.cloud.datacatalog.v1.IEntry|null); + + /** TaggedEntry presentTags */ + presentTags?: (google.cloud.datacatalog.v1.ITag[]|null); + + /** TaggedEntry absentTags */ + absentTags?: (google.cloud.datacatalog.v1.ITag[]|null); + } + + /** Represents a TaggedEntry. */ + class TaggedEntry implements ITaggedEntry { + + /** + * Constructs a new TaggedEntry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.ITaggedEntry); + + /** TaggedEntry v1Entry. */ + public v1Entry?: (google.cloud.datacatalog.v1.IEntry|null); + + /** TaggedEntry presentTags. */ + public presentTags: google.cloud.datacatalog.v1.ITag[]; + + /** TaggedEntry absentTags. */ + public absentTags: google.cloud.datacatalog.v1.ITag[]; + + /** TaggedEntry entry. */ + public entry?: "v1Entry"; + + /** + * Creates a new TaggedEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns TaggedEntry instance + */ + public static create(properties?: google.cloud.datacatalog.v1.ITaggedEntry): google.cloud.datacatalog.v1.TaggedEntry; + + /** + * Encodes the specified TaggedEntry message. Does not implicitly {@link google.cloud.datacatalog.v1.TaggedEntry.verify|verify} messages. + * @param message TaggedEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.ITaggedEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TaggedEntry message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.TaggedEntry.verify|verify} messages. + * @param message TaggedEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.ITaggedEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TaggedEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TaggedEntry + * @throws {Error} If the payload is not a 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.TaggedEntry; + + /** + * Decodes a TaggedEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TaggedEntry + * @throws {Error} If the payload is 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.TaggedEntry; + + /** + * Verifies a TaggedEntry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TaggedEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TaggedEntry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.TaggedEntry; + + /** + * Creates a plain object from a TaggedEntry message. Also converts values to other types if specified. + * @param message TaggedEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.TaggedEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TaggedEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TaggedEntry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DumpItem. */ + interface IDumpItem { + + /** DumpItem taggedEntry */ + taggedEntry?: (google.cloud.datacatalog.v1.ITaggedEntry|null); + } + + /** Represents a DumpItem. */ + class DumpItem implements IDumpItem { + + /** + * Constructs a new DumpItem. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.IDumpItem); + + /** DumpItem taggedEntry. */ + public taggedEntry?: (google.cloud.datacatalog.v1.ITaggedEntry|null); + + /** DumpItem item. */ + public item?: "taggedEntry"; + + /** + * Creates a new DumpItem instance using the specified properties. + * @param [properties] Properties to set + * @returns DumpItem instance + */ + public static create(properties?: google.cloud.datacatalog.v1.IDumpItem): google.cloud.datacatalog.v1.DumpItem; + + /** + * Encodes the specified DumpItem message. Does not implicitly {@link google.cloud.datacatalog.v1.DumpItem.verify|verify} messages. + * @param message DumpItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.IDumpItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DumpItem message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DumpItem.verify|verify} messages. + * @param message DumpItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.IDumpItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DumpItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DumpItem + * @throws {Error} If the payload is not a 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.DumpItem; + + /** + * Decodes a DumpItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DumpItem + * @throws {Error} If the payload is 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.DumpItem; + + /** + * Verifies a DumpItem message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DumpItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DumpItem + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.DumpItem; + + /** + * Creates a plain object from a DumpItem message. Also converts values to other types if specified. + * @param message DumpItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.DumpItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DumpItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DumpItem + * @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); + + /** Taxonomy service */ + service?: (google.cloud.datacatalog.v1.Taxonomy.IService|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[]; + + /** Taxonomy service. */ + public service?: (google.cloud.datacatalog.v1.Taxonomy.IService|null); + + /** + * 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 Service. */ + interface IService { + + /** Service name */ + name?: (google.cloud.datacatalog.v1.ManagingSystem|keyof typeof google.cloud.datacatalog.v1.ManagingSystem|null); + + /** Service identity */ + identity?: (string|null); + } + + /** Represents a Service. */ + class Service implements IService { + + /** + * Constructs a new Service. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1.Taxonomy.IService); + + /** Service name. */ + public name: (google.cloud.datacatalog.v1.ManagingSystem|keyof typeof google.cloud.datacatalog.v1.ManagingSystem); + + /** Service identity. */ + public identity: string; + + /** + * Creates a new Service instance using the specified properties. + * @param [properties] Properties to set + * @returns Service instance + */ + public static create(properties?: google.cloud.datacatalog.v1.Taxonomy.IService): google.cloud.datacatalog.v1.Taxonomy.Service; + + /** + * Encodes the specified Service message. Does not implicitly {@link google.cloud.datacatalog.v1.Taxonomy.Service.verify|verify} messages. + * @param message Service message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1.Taxonomy.IService, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Service message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.Taxonomy.Service.verify|verify} messages. + * @param message Service message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1.Taxonomy.IService, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Service message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Service + * @throws {Error} If the payload is not a 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.Service; + + /** + * Decodes a Service message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Service + * @throws {Error} If the payload is 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.Service; + + /** + * Verifies a Service message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Service message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Service + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.Taxonomy.Service; + + /** + * Creates a plain object from a Service message. Also converts values to other types if specified. + * @param message Service + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1.Taxonomy.Service, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Service to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Service + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** 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); + + /** ListTaxonomiesRequest filter */ + filter?: (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; + + /** ListTaxonomiesRequest filter. */ + public filter: 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 api. */ + namespace api { + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7, + IDENTIFIER = 8 + } + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { + + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); + + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + } + + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { + + /** + * Constructs a new CommonLanguageSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICommonLanguageSettings); + + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; + + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; + + /** + * Verifies a CommonLanguageSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { + + /** ClientLibrarySettings version */ + version?: (string|null); + + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); + + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } + + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { + + /** + * Constructs a new ClientLibrarySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IClientLibrarySettings); + + /** ClientLibrarySettings version. */ + public version: string; + + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; + + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientLibrarySettings instance + */ + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; + + /** + * Verifies a ClientLibrarySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientLibrarySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientLibrarySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publishing. */ + interface IPublishing { + + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); + + /** Publishing newIssueUri */ + newIssueUri?: (string|null); + + /** Publishing documentationUri */ + documentationUri?: (string|null); + + /** Publishing apiShortName */ + apiShortName?: (string|null); + + /** Publishing githubLabel */ + githubLabel?: (string|null); + + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); + + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); + + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); + + /** Publishing restReferenceDocumentationUri */ + restReferenceDocumentationUri?: (string|null); + } + + /** Represents a Publishing. */ + class Publishing implements IPublishing { + + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); + + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; + + /** Publishing newIssueUri. */ + public newIssueUri: string; + + /** Publishing documentationUri. */ + public documentationUri: string; + + /** Publishing apiShortName. */ + public apiShortName: string; + + /** Publishing githubLabel. */ + public githubLabel: string; + + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; + + /** Publishing docTagPrefix. */ + public docTagPrefix: string; + + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; + + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + + /** Publishing restReferenceDocumentationUri. */ + public restReferenceDocumentationUri: string; + + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; + + /** + * Verifies a Publishing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; + + /** + * Verifies a JavaSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; + + /** + * Verifies a CppSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; + + /** + * Verifies a PhpSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; + + /** + * Verifies a PythonSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; + + /** + * Verifies a NodeSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); + } + + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { + + /** + * Constructs a new DotnetSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDotnetSettings); + + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DotnetSettings instance + */ + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; + + /** + * Verifies a DotnetSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DotnetSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DotnetSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DotnetSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RubySettings. */ + interface IRubySettings { + + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { + + /** + * Constructs a new RubySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRubySettings); + + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new RubySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RubySettings instance + */ + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; + + /** + * Verifies a RubySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RubySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RubySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RubySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoSettings. */ + interface IGoSettings { + + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; + + /** + * Verifies a GoSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields */ + autoPopulatedFields?: (string[]|null); + } + + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { + + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); + + /** MethodSettings selector. */ + public selector: string; + + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodSettings instance + */ + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; + + /** + * Verifies a MethodSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodSettings { + + /** Properties of a LongRunning. */ + interface ILongRunning { + + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); + + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { + + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); + + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; + + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; + + /** + * Verifies a LongRunning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4, + SHOPPING = 5, + GEO = 6, + GENERATIVE_AI = 7 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Verifies a Declaration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions debugRedact. */ + public debugRedact: boolean; + + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + + /** FieldOptions targets. */ + public targets: google.protobuf.FieldOptions.OptionTargetType[]; + + /** FieldOptions editionDefaults. */ + public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + + /** FieldOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } + + /** OptionTargetType enum. */ + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9 + } + + /** Properties of an EditionDefault. */ + interface IEditionDefault { + + /** EditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** EditionDefault value */ + value?: (string|null); + } + + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { + + /** + * Constructs a new EditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + + /** EditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** EditionDefault value. */ + public value: string; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns EditionDefault instance + */ + public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; + + /** + * Verifies an EditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @param message EditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** EnumOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** EnumOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact */ + debugRedact?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact. */ + public debugRedact: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + + /** ServiceOptions .google.api.apiVersion */ + ".google.api.apiVersion"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a FeatureSet. */ + interface IFeatureSet { + + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + } + + /** Represents a FeatureSet. */ + class FeatureSet implements IFeatureSet { + + /** + * Constructs a new FeatureSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSet); + + /** FeatureSet fieldPresence. */ + public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + + /** FeatureSet enumType. */ + public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + + /** FeatureSet repeatedFieldEncoding. */ + public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + + /** FeatureSet utf8Validation. */ + public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); + + /** FeatureSet messageEncoding. */ + public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + + /** FeatureSet jsonFormat. */ + public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + + /** + * Creates a new FeatureSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSet instance + */ + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; + + /** + * Verifies a FeatureSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @param message FeatureSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSet { + + /** FieldPresence enum. */ + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3 + } + + /** EnumType enum. */ + enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2 + } + + /** RepeatedFieldEncoding enum. */ + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + PACKED = 1, + EXPANDED = 2 + } + + /** Utf8Validation enum. */ + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0, + VERIFY = 2, + NONE = 3 + } + + /** MessageEncoding enum. */ + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0, + LENGTH_PREFIXED = 1, + DELIMITED = 2 + } + + /** JsonFormat enum. */ + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0, + ALLOW = 1, + LEGACY_BEST_EFFORT = 2 + } + } + + /** Properties of a FeatureSetDefaults. */ + interface IFeatureSetDefaults { + + /** FeatureSetDefaults defaults */ + defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + + /** FeatureSetDefaults minimumEdition */ + minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetDefaults maximumEdition */ + maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSetDefaults. */ + class FeatureSetDefaults implements IFeatureSetDefaults { + + /** + * Constructs a new FeatureSetDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSetDefaults); + + /** FeatureSetDefaults defaults. */ + public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + + /** FeatureSetDefaults minimumEdition. */ + public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetDefaults maximumEdition. */ + public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetDefaults instance + */ + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; + + /** + * Verifies a FeatureSetDefaults message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetDefaults + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @param message FeatureSetDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSetDefaults { + + /** Properties of a FeatureSetEditionDefault. */ + interface IFeatureSetEditionDefault { + + /** FeatureSetEditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetEditionDefault features */ + features?: (google.protobuf.IFeatureSet|null); + } + + /** Represents a FeatureSetEditionDefault. */ + class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + + /** + * Constructs a new FeatureSetEditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + + /** FeatureSetEditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetEditionDefault features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetEditionDefault instance + */ + public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Verifies a FeatureSetEditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetEditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @param message FeatureSetEditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a 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 Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** 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; + } + } + + /** Namespace longrunning. */ + namespace longrunning { + + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { + + /** + * Constructs a new Operations service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Operations service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Operations; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { + + /** + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation name */ + name?: (string|null); + + /** Operation metadata */ + metadata?: (google.protobuf.IAny|null); + + /** Operation done */ + done?: (boolean|null); + + /** Operation error */ + error?: (google.rpc.IStatus|null); + + /** Operation response */ + response?: (google.protobuf.IAny|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperation); + + /** Operation name. */ + public name: string; + + /** Operation metadata. */ + public metadata?: (google.protobuf.IAny|null); + + /** Operation done. */ + public done: boolean; + + /** Operation error. */ + public error?: (google.rpc.IStatus|null); + + /** Operation response. */ + public response?: (google.protobuf.IAny|null); + + /** Operation result. */ + public result?: ("error"|"response"); + + /** + * Creates a new Operation instance using the specified properties. + * @param [properties] Properties to set + * @returns Operation instance + */ + public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; + + /** + * Verifies an Operation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operation + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { + + /** GetOperationRequest name */ + name?: (string|null); + } + + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { + + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IGetOperationRequest); + + /** GetOperationRequest name. */ + public name: string; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; + + /** + * Verifies a GetOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @param message GetOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { + + /** ListOperationsRequest name */ + name?: (string|null); + + /** ListOperationsRequest filter */ + filter?: (string|null); + + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { + + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); + + /** ListOperationsRequest name. */ + public name: string; + + /** ListOperationsRequest filter. */ + public filter: string; + + /** ListOperationsRequest pageSize. */ + public pageSize: number; + + /** ListOperationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsRequest instance + */ + public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; + + /** + * Verifies a ListOperationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @param message ListOperationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { + + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); + + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { + + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsResponse); + + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; + + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; + + /** + * Verifies a ListOperationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @param message ListOperationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { + + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.ICancelOperationRequest); + + /** CancelOperationRequest name. */ + public name: string; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; + + /** + * Verifies a CancelOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @param message CancelOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteOperationRequest. */ + interface IDeleteOperationRequest { + + /** DeleteOperationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { + + /** + * Constructs a new DeleteOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IDeleteOperationRequest); + + /** DeleteOperationRequest name. */ + public name: string; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOperationRequest instance + */ + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; + + /** + * Verifies a DeleteOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @param message DeleteOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { + + /** WaitOperationRequest name */ + name?: (string|null); + + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); + } + + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { + + /** + * Constructs a new WaitOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IWaitOperationRequest); + + /** WaitOperationRequest name. */ + public name: string; + + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WaitOperationRequest instance + */ + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; + + /** + * Verifies a WaitOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaitOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @param message WaitOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WaitOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WaitOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OperationInfo. */ + interface IOperationInfo { + + /** OperationInfo responseType */ + responseType?: (string|null); + + /** OperationInfo metadataType */ + metadataType?: (string|null); + } + + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { + + /** + * Constructs a new OperationInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperationInfo); + + /** OperationInfo responseType. */ + public responseType: string; + + /** OperationInfo metadataType. */ + public metadataType: string; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationInfo instance + */ + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; + + /** + * Verifies an OperationInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationInfo + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @param message OperationInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/protos/protos.js b/owl-bot-staging/google-cloud-datacatalog/v1/protos/protos.js new file mode 100644 index 00000000000..5a5788157cf --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/protos/protos.js @@ -0,0 +1,63902 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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 + * @property {number} CLOUD_SPANNER=6 CLOUD_SPANNER value + * @property {number} CLOUD_BIGTABLE=7 CLOUD_BIGTABLE value + * @property {number} CLOUD_SQL=8 CLOUD_SQL value + * @property {number} LOOKER=9 LOOKER value + * @property {number} VERTEX_AI=10 VERTEX_AI 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; + values[valuesById[6] = "CLOUD_SPANNER"] = 6; + values[valuesById[7] = "CLOUD_BIGTABLE"] = 7; + values[valuesById[8] = "CLOUD_SQL"] = 8; + values[valuesById[9] = "LOOKER"] = 9; + values[valuesById[10] = "VERTEX_AI"] = 10; + return values; + })(); + + /** + * ManagingSystem enum. + * @name google.cloud.datacatalog.v1.ManagingSystem + * @enum {number} + * @property {number} MANAGING_SYSTEM_UNSPECIFIED=0 MANAGING_SYSTEM_UNSPECIFIED value + * @property {number} MANAGING_SYSTEM_DATAPLEX=1 MANAGING_SYSTEM_DATAPLEX value + * @property {number} MANAGING_SYSTEM_OTHER=2 MANAGING_SYSTEM_OTHER value + */ + v1.ManagingSystem = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MANAGING_SYSTEM_UNSPECIFIED"] = 0; + values[valuesById[1] = "MANAGING_SYSTEM_DATAPLEX"] = 1; + values[valuesById[2] = "MANAGING_SYSTEM_OTHER"] = 2; + 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|reconcileTags}. + * @memberof google.cloud.datacatalog.v1.DataCatalog + * @typedef ReconcileTagsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ReconcileTags. + * @function reconcileTags + * @memberof google.cloud.datacatalog.v1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1.IReconcileTagsRequest} request ReconcileTagsRequest message or plain object + * @param {google.cloud.datacatalog.v1.DataCatalog.ReconcileTagsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.reconcileTags = function reconcileTags(request, callback) { + return this.rpcCall(reconcileTags, $root.google.cloud.datacatalog.v1.ReconcileTagsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ReconcileTags" }); + + /** + * Calls ReconcileTags. + * @function reconcileTags + * @memberof google.cloud.datacatalog.v1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1.IReconcileTagsRequest} request ReconcileTagsRequest 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 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|importEntries}. + * @memberof google.cloud.datacatalog.v1.DataCatalog + * @typedef ImportEntriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ImportEntries. + * @function importEntries + * @memberof google.cloud.datacatalog.v1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1.IImportEntriesRequest} request ImportEntriesRequest message or plain object + * @param {google.cloud.datacatalog.v1.DataCatalog.ImportEntriesCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.importEntries = function importEntries(request, callback) { + return this.rpcCall(importEntries, $root.google.cloud.datacatalog.v1.ImportEntriesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportEntries" }); + + /** + * Calls ImportEntries. + * @function importEntries + * @memberof google.cloud.datacatalog.v1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1.IImportEntriesRequest} request ImportEntriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|setConfig}. + * @memberof google.cloud.datacatalog.v1.DataCatalog + * @typedef SetConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1.MigrationConfig} [response] MigrationConfig + */ + + /** + * Calls SetConfig. + * @function setConfig + * @memberof google.cloud.datacatalog.v1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1.ISetConfigRequest} request SetConfigRequest message or plain object + * @param {google.cloud.datacatalog.v1.DataCatalog.SetConfigCallback} callback Node-style callback called with the error, if any, and MigrationConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.setConfig = function setConfig(request, callback) { + return this.rpcCall(setConfig, $root.google.cloud.datacatalog.v1.SetConfigRequest, $root.google.cloud.datacatalog.v1.MigrationConfig, request, callback); + }, "name", { value: "SetConfig" }); + + /** + * Calls SetConfig. + * @function setConfig + * @memberof google.cloud.datacatalog.v1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1.ISetConfigRequest} request SetConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|retrieveConfig}. + * @memberof google.cloud.datacatalog.v1.DataCatalog + * @typedef RetrieveConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1.OrganizationConfig} [response] OrganizationConfig + */ + + /** + * Calls RetrieveConfig. + * @function retrieveConfig + * @memberof google.cloud.datacatalog.v1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1.IRetrieveConfigRequest} request RetrieveConfigRequest message or plain object + * @param {google.cloud.datacatalog.v1.DataCatalog.RetrieveConfigCallback} callback Node-style callback called with the error, if any, and OrganizationConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.retrieveConfig = function retrieveConfig(request, callback) { + return this.rpcCall(retrieveConfig, $root.google.cloud.datacatalog.v1.RetrieveConfigRequest, $root.google.cloud.datacatalog.v1.OrganizationConfig, request, callback); + }, "name", { value: "RetrieveConfig" }); + + /** + * Calls RetrieveConfig. + * @function retrieveConfig + * @memberof google.cloud.datacatalog.v1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1.IRetrieveConfigRequest} request RetrieveConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|retrieveEffectiveConfig}. + * @memberof google.cloud.datacatalog.v1.DataCatalog + * @typedef RetrieveEffectiveConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1.MigrationConfig} [response] MigrationConfig + */ + + /** + * Calls RetrieveEffectiveConfig. + * @function retrieveEffectiveConfig + * @memberof google.cloud.datacatalog.v1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest} request RetrieveEffectiveConfigRequest message or plain object + * @param {google.cloud.datacatalog.v1.DataCatalog.RetrieveEffectiveConfigCallback} callback Node-style callback called with the error, if any, and MigrationConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.retrieveEffectiveConfig = function retrieveEffectiveConfig(request, callback) { + return this.rpcCall(retrieveEffectiveConfig, $root.google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest, $root.google.cloud.datacatalog.v1.MigrationConfig, request, callback); + }, "name", { value: "RetrieveEffectiveConfig" }); + + /** + * Calls RetrieveEffectiveConfig. + * @function retrieveEffectiveConfig + * @memberof google.cloud.datacatalog.v1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest} request RetrieveEffectiveConfigRequest 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 + * @property {boolean|null} [adminSearch] SearchCatalogRequest adminSearch + */ + + /** + * 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 = ""; + + /** + * SearchCatalogRequest adminSearch. + * @member {boolean} adminSearch + * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest + * @instance + */ + SearchCatalogRequest.prototype.adminSearch = false; + + /** + * 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(); + if (message.adminSearch != null && Object.hasOwnProperty.call(message, "adminSearch")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.adminSearch); + 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; + } + case 17: { + message.adminSearch = reader.bool(); + 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"; + if (message.adminSearch != null && message.hasOwnProperty("adminSearch")) + if (typeof message.adminSearch !== "boolean") + return "adminSearch: boolean 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); + if (object.adminSearch != null) + message.adminSearch = Boolean(object.adminSearch); + 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; + object.adminSearch = false; + } + 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); + if (message.adminSearch != null && message.hasOwnProperty("adminSearch")) + object.adminSearch = message.adminSearch; + 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 {number|null} [totalSize] SearchCatalogResponse totalSize + * @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 totalSize. + * @member {number} totalSize + * @memberof google.cloud.datacatalog.v1.SearchCatalogResponse + * @instance + */ + SearchCatalogResponse.prototype.totalSize = 0; + + /** + * 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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.totalSize); + 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 2: { + message.totalSize = reader.int32(); + 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.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + 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.totalSize != null) + message.totalSize = object.totalSize | 0; + 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.totalSize = 0; + 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.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + 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 + * @property {string|null} [project] LookupEntryRequest project + * @property {string|null} [location] LookupEntryRequest location + */ + + /** + * 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; + + /** + * LookupEntryRequest project. + * @member {string} project + * @memberof google.cloud.datacatalog.v1.LookupEntryRequest + * @instance + */ + LookupEntryRequest.prototype.project = ""; + + /** + * LookupEntryRequest location. + * @member {string} location + * @memberof google.cloud.datacatalog.v1.LookupEntryRequest + * @instance + */ + LookupEntryRequest.prototype.location = ""; + + // 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); + if (message.project != null && Object.hasOwnProperty.call(message, "project")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.project); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.location); + 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; + } + case 6: { + message.project = reader.string(); + break; + } + case 7: { + message.location = 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"; + } + if (message.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: 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); + if (object.project != null) + message.project = String(object.project); + if (object.location != null) + message.location = String(object.location); + 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 (options.defaults) { + object.project = ""; + object.location = ""; + } + 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"; + } + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + 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.ISqlDatabaseSystemSpec|null} [sqlDatabaseSystemSpec] Entry sqlDatabaseSystemSpec + * @property {google.cloud.datacatalog.v1.ILookerSystemSpec|null} [lookerSystemSpec] Entry lookerSystemSpec + * @property {google.cloud.datacatalog.v1.ICloudBigtableSystemSpec|null} [cloudBigtableSystemSpec] Entry cloudBigtableSystemSpec + * @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.IDatasetSpec|null} [datasetSpec] Entry datasetSpec + * @property {google.cloud.datacatalog.v1.IFilesetSpec|null} [filesetSpec] Entry filesetSpec + * @property {google.cloud.datacatalog.v1.IServiceSpec|null} [serviceSpec] Entry serviceSpec + * @property {google.cloud.datacatalog.v1.IModelSpec|null} [modelSpec] Entry modelSpec + * @property {google.cloud.datacatalog.v1.IFeatureOnlineStoreSpec|null} [featureOnlineStoreSpec] Entry featureOnlineStoreSpec + * @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 sqlDatabaseSystemSpec. + * @member {google.cloud.datacatalog.v1.ISqlDatabaseSystemSpec|null|undefined} sqlDatabaseSystemSpec + * @memberof google.cloud.datacatalog.v1.Entry + * @instance + */ + Entry.prototype.sqlDatabaseSystemSpec = null; + + /** + * Entry lookerSystemSpec. + * @member {google.cloud.datacatalog.v1.ILookerSystemSpec|null|undefined} lookerSystemSpec + * @memberof google.cloud.datacatalog.v1.Entry + * @instance + */ + Entry.prototype.lookerSystemSpec = null; + + /** + * Entry cloudBigtableSystemSpec. + * @member {google.cloud.datacatalog.v1.ICloudBigtableSystemSpec|null|undefined} cloudBigtableSystemSpec + * @memberof google.cloud.datacatalog.v1.Entry + * @instance + */ + Entry.prototype.cloudBigtableSystemSpec = 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 datasetSpec. + * @member {google.cloud.datacatalog.v1.IDatasetSpec|null|undefined} datasetSpec + * @memberof google.cloud.datacatalog.v1.Entry + * @instance + */ + Entry.prototype.datasetSpec = null; + + /** + * Entry filesetSpec. + * @member {google.cloud.datacatalog.v1.IFilesetSpec|null|undefined} filesetSpec + * @memberof google.cloud.datacatalog.v1.Entry + * @instance + */ + Entry.prototype.filesetSpec = null; + + /** + * Entry serviceSpec. + * @member {google.cloud.datacatalog.v1.IServiceSpec|null|undefined} serviceSpec + * @memberof google.cloud.datacatalog.v1.Entry + * @instance + */ + Entry.prototype.serviceSpec = null; + + /** + * Entry modelSpec. + * @member {google.cloud.datacatalog.v1.IModelSpec|null|undefined} modelSpec + * @memberof google.cloud.datacatalog.v1.Entry + * @instance + */ + Entry.prototype.modelSpec = null; + + /** + * Entry featureOnlineStoreSpec. + * @member {google.cloud.datacatalog.v1.IFeatureOnlineStoreSpec|null|undefined} featureOnlineStoreSpec + * @memberof google.cloud.datacatalog.v1.Entry + * @instance + */ + Entry.prototype.featureOnlineStoreSpec = 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 systemSpec. + * @member {"sqlDatabaseSystemSpec"|"lookerSystemSpec"|"cloudBigtableSystemSpec"|undefined} systemSpec + * @memberof google.cloud.datacatalog.v1.Entry + * @instance + */ + Object.defineProperty(Entry.prototype, "systemSpec", { + get: $util.oneOfGetter($oneOfFields = ["sqlDatabaseSystemSpec", "lookerSystemSpec", "cloudBigtableSystemSpec"]), + 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"|"datasetSpec"|"filesetSpec"|"serviceSpec"|"modelSpec"|"featureOnlineStoreSpec"|undefined} spec + * @memberof google.cloud.datacatalog.v1.Entry + * @instance + */ + Object.defineProperty(Entry.prototype, "spec", { + get: $util.oneOfGetter($oneOfFields = ["databaseTableSpec", "dataSourceConnectionSpec", "routineSpec", "datasetSpec", "filesetSpec", "serviceSpec", "modelSpec", "featureOnlineStoreSpec"]), + 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.datasetSpec != null && Object.hasOwnProperty.call(message, "datasetSpec")) + $root.google.cloud.datacatalog.v1.DatasetSpec.encode(message.datasetSpec, writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); + 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(); + if (message.sqlDatabaseSystemSpec != null && Object.hasOwnProperty.call(message, "sqlDatabaseSystemSpec")) + $root.google.cloud.datacatalog.v1.SqlDatabaseSystemSpec.encode(message.sqlDatabaseSystemSpec, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); + if (message.lookerSystemSpec != null && Object.hasOwnProperty.call(message, "lookerSystemSpec")) + $root.google.cloud.datacatalog.v1.LookerSystemSpec.encode(message.lookerSystemSpec, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); + if (message.cloudBigtableSystemSpec != null && Object.hasOwnProperty.call(message, "cloudBigtableSystemSpec")) + $root.google.cloud.datacatalog.v1.CloudBigtableSystemSpec.encode(message.cloudBigtableSystemSpec, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim(); + if (message.serviceSpec != null && Object.hasOwnProperty.call(message, "serviceSpec")) + $root.google.cloud.datacatalog.v1.ServiceSpec.encode(message.serviceSpec, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); + if (message.modelSpec != null && Object.hasOwnProperty.call(message, "modelSpec")) + $root.google.cloud.datacatalog.v1.ModelSpec.encode(message.modelSpec, writer.uint32(/* id 43, wireType 2 =*/346).fork()).ldelim(); + if (message.featureOnlineStoreSpec != null && Object.hasOwnProperty.call(message, "featureOnlineStoreSpec")) + $root.google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.encode(message.featureOnlineStoreSpec, writer.uint32(/* id 45, wireType 2 =*/362).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 39: { + message.sqlDatabaseSystemSpec = $root.google.cloud.datacatalog.v1.SqlDatabaseSystemSpec.decode(reader, reader.uint32()); + break; + } + case 40: { + message.lookerSystemSpec = $root.google.cloud.datacatalog.v1.LookerSystemSpec.decode(reader, reader.uint32()); + break; + } + case 41: { + message.cloudBigtableSystemSpec = $root.google.cloud.datacatalog.v1.CloudBigtableSystemSpec.decode(reader, reader.uint32()); + 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 32: { + message.datasetSpec = $root.google.cloud.datacatalog.v1.DatasetSpec.decode(reader, reader.uint32()); + break; + } + case 33: { + message.filesetSpec = $root.google.cloud.datacatalog.v1.FilesetSpec.decode(reader, reader.uint32()); + break; + } + case 42: { + message.serviceSpec = $root.google.cloud.datacatalog.v1.ServiceSpec.decode(reader, reader.uint32()); + break; + } + case 43: { + message.modelSpec = $root.google.cloud.datacatalog.v1.ModelSpec.decode(reader, reader.uint32()); + break; + } + case 45: { + message.featureOnlineStoreSpec = $root.google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.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: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + 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: + case 6: + case 7: + case 8: + case 9: + case 10: + 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.sqlDatabaseSystemSpec != null && message.hasOwnProperty("sqlDatabaseSystemSpec")) { + properties.systemSpec = 1; + { + var error = $root.google.cloud.datacatalog.v1.SqlDatabaseSystemSpec.verify(message.sqlDatabaseSystemSpec); + if (error) + return "sqlDatabaseSystemSpec." + error; + } + } + if (message.lookerSystemSpec != null && message.hasOwnProperty("lookerSystemSpec")) { + if (properties.systemSpec === 1) + return "systemSpec: multiple values"; + properties.systemSpec = 1; + { + var error = $root.google.cloud.datacatalog.v1.LookerSystemSpec.verify(message.lookerSystemSpec); + if (error) + return "lookerSystemSpec." + error; + } + } + if (message.cloudBigtableSystemSpec != null && message.hasOwnProperty("cloudBigtableSystemSpec")) { + if (properties.systemSpec === 1) + return "systemSpec: multiple values"; + properties.systemSpec = 1; + { + var error = $root.google.cloud.datacatalog.v1.CloudBigtableSystemSpec.verify(message.cloudBigtableSystemSpec); + if (error) + return "cloudBigtableSystemSpec." + error; + } + } + 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.datasetSpec != null && message.hasOwnProperty("datasetSpec")) { + if (properties.spec === 1) + return "spec: multiple values"; + properties.spec = 1; + { + var error = $root.google.cloud.datacatalog.v1.DatasetSpec.verify(message.datasetSpec); + if (error) + return "datasetSpec." + 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.serviceSpec != null && message.hasOwnProperty("serviceSpec")) { + if (properties.spec === 1) + return "spec: multiple values"; + properties.spec = 1; + { + var error = $root.google.cloud.datacatalog.v1.ServiceSpec.verify(message.serviceSpec); + if (error) + return "serviceSpec." + error; + } + } + if (message.modelSpec != null && message.hasOwnProperty("modelSpec")) { + if (properties.spec === 1) + return "spec: multiple values"; + properties.spec = 1; + { + var error = $root.google.cloud.datacatalog.v1.ModelSpec.verify(message.modelSpec); + if (error) + return "modelSpec." + error; + } + } + if (message.featureOnlineStoreSpec != null && message.hasOwnProperty("featureOnlineStoreSpec")) { + if (properties.spec === 1) + return "spec: multiple values"; + properties.spec = 1; + { + var error = $root.google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.verify(message.featureOnlineStoreSpec); + if (error) + return "featureOnlineStoreSpec." + 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; + case "DATABASE_SCHEMA": + case 15: + message.type = 15; + break; + case "DASHBOARD": + case 16: + message.type = 16; + break; + case "EXPLORE": + case 17: + message.type = 17; + break; + case "LOOK": + case 18: + message.type = 18; + break; + case "FEATURE_ONLINE_STORE": + case 19: + message.type = 19; + break; + case "FEATURE_VIEW": + case 20: + message.type = 20; + break; + case "FEATURE_GROUP": + case 21: + message.type = 21; + 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; + case "CLOUD_SPANNER": + case 6: + message.integratedSystem = 6; + break; + case "CLOUD_BIGTABLE": + case 7: + message.integratedSystem = 7; + break; + case "CLOUD_SQL": + case 8: + message.integratedSystem = 8; + break; + case "LOOKER": + case 9: + message.integratedSystem = 9; + break; + case "VERTEX_AI": + case 10: + message.integratedSystem = 10; + break; + } + if (object.userSpecifiedSystem != null) + message.userSpecifiedSystem = String(object.userSpecifiedSystem); + if (object.sqlDatabaseSystemSpec != null) { + if (typeof object.sqlDatabaseSystemSpec !== "object") + throw TypeError(".google.cloud.datacatalog.v1.Entry.sqlDatabaseSystemSpec: object expected"); + message.sqlDatabaseSystemSpec = $root.google.cloud.datacatalog.v1.SqlDatabaseSystemSpec.fromObject(object.sqlDatabaseSystemSpec); + } + if (object.lookerSystemSpec != null) { + if (typeof object.lookerSystemSpec !== "object") + throw TypeError(".google.cloud.datacatalog.v1.Entry.lookerSystemSpec: object expected"); + message.lookerSystemSpec = $root.google.cloud.datacatalog.v1.LookerSystemSpec.fromObject(object.lookerSystemSpec); + } + if (object.cloudBigtableSystemSpec != null) { + if (typeof object.cloudBigtableSystemSpec !== "object") + throw TypeError(".google.cloud.datacatalog.v1.Entry.cloudBigtableSystemSpec: object expected"); + message.cloudBigtableSystemSpec = $root.google.cloud.datacatalog.v1.CloudBigtableSystemSpec.fromObject(object.cloudBigtableSystemSpec); + } + 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.datasetSpec != null) { + if (typeof object.datasetSpec !== "object") + throw TypeError(".google.cloud.datacatalog.v1.Entry.datasetSpec: object expected"); + message.datasetSpec = $root.google.cloud.datacatalog.v1.DatasetSpec.fromObject(object.datasetSpec); + } + 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.serviceSpec != null) { + if (typeof object.serviceSpec !== "object") + throw TypeError(".google.cloud.datacatalog.v1.Entry.serviceSpec: object expected"); + message.serviceSpec = $root.google.cloud.datacatalog.v1.ServiceSpec.fromObject(object.serviceSpec); + } + if (object.modelSpec != null) { + if (typeof object.modelSpec !== "object") + throw TypeError(".google.cloud.datacatalog.v1.Entry.modelSpec: object expected"); + message.modelSpec = $root.google.cloud.datacatalog.v1.ModelSpec.fromObject(object.modelSpec); + } + if (object.featureOnlineStoreSpec != null) { + if (typeof object.featureOnlineStoreSpec !== "object") + throw TypeError(".google.cloud.datacatalog.v1.Entry.featureOnlineStoreSpec: object expected"); + message.featureOnlineStoreSpec = $root.google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.fromObject(object.featureOnlineStoreSpec); + } + 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.datasetSpec != null && message.hasOwnProperty("datasetSpec")) { + object.datasetSpec = $root.google.cloud.datacatalog.v1.DatasetSpec.toObject(message.datasetSpec, options); + if (options.oneofs) + object.spec = "datasetSpec"; + } + 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); + if (message.sqlDatabaseSystemSpec != null && message.hasOwnProperty("sqlDatabaseSystemSpec")) { + object.sqlDatabaseSystemSpec = $root.google.cloud.datacatalog.v1.SqlDatabaseSystemSpec.toObject(message.sqlDatabaseSystemSpec, options); + if (options.oneofs) + object.systemSpec = "sqlDatabaseSystemSpec"; + } + if (message.lookerSystemSpec != null && message.hasOwnProperty("lookerSystemSpec")) { + object.lookerSystemSpec = $root.google.cloud.datacatalog.v1.LookerSystemSpec.toObject(message.lookerSystemSpec, options); + if (options.oneofs) + object.systemSpec = "lookerSystemSpec"; + } + if (message.cloudBigtableSystemSpec != null && message.hasOwnProperty("cloudBigtableSystemSpec")) { + object.cloudBigtableSystemSpec = $root.google.cloud.datacatalog.v1.CloudBigtableSystemSpec.toObject(message.cloudBigtableSystemSpec, options); + if (options.oneofs) + object.systemSpec = "cloudBigtableSystemSpec"; + } + if (message.serviceSpec != null && message.hasOwnProperty("serviceSpec")) { + object.serviceSpec = $root.google.cloud.datacatalog.v1.ServiceSpec.toObject(message.serviceSpec, options); + if (options.oneofs) + object.spec = "serviceSpec"; + } + if (message.modelSpec != null && message.hasOwnProperty("modelSpec")) { + object.modelSpec = $root.google.cloud.datacatalog.v1.ModelSpec.toObject(message.modelSpec, options); + if (options.oneofs) + object.spec = "modelSpec"; + } + if (message.featureOnlineStoreSpec != null && message.hasOwnProperty("featureOnlineStoreSpec")) { + object.featureOnlineStoreSpec = $root.google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.toObject(message.featureOnlineStoreSpec, options); + if (options.oneofs) + object.spec = "featureOnlineStoreSpec"; + } + 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 + * @property {google.cloud.datacatalog.v1.DatabaseTableSpec.IDatabaseViewSpec|null} [databaseViewSpec] DatabaseTableSpec databaseViewSpec + */ + + /** + * 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; + + /** + * DatabaseTableSpec databaseViewSpec. + * @member {google.cloud.datacatalog.v1.DatabaseTableSpec.IDatabaseViewSpec|null|undefined} databaseViewSpec + * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec + * @instance + */ + DatabaseTableSpec.prototype.databaseViewSpec = 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(); + if (message.databaseViewSpec != null && Object.hasOwnProperty.call(message, "databaseViewSpec")) + $root.google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.encode(message.databaseViewSpec, writer.uint32(/* id 3, wireType 2 =*/26).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; + } + case 3: { + message.databaseViewSpec = $root.google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.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; + } + if (message.databaseViewSpec != null && message.hasOwnProperty("databaseViewSpec")) { + var error = $root.google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.verify(message.databaseViewSpec); + if (error) + return "databaseViewSpec." + 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); + } + if (object.databaseViewSpec != null) { + if (typeof object.databaseViewSpec !== "object") + throw TypeError(".google.cloud.datacatalog.v1.DatabaseTableSpec.databaseViewSpec: object expected"); + message.databaseViewSpec = $root.google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.fromObject(object.databaseViewSpec); + } + 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; + object.databaseViewSpec = 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); + if (message.databaseViewSpec != null && message.hasOwnProperty("databaseViewSpec")) + object.databaseViewSpec = $root.google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.toObject(message.databaseViewSpec, 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; + })(); + + DatabaseTableSpec.DatabaseViewSpec = (function() { + + /** + * Properties of a DatabaseViewSpec. + * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec + * @interface IDatabaseViewSpec + * @property {google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType|null} [viewType] DatabaseViewSpec viewType + * @property {string|null} [baseTable] DatabaseViewSpec baseTable + * @property {string|null} [sqlQuery] DatabaseViewSpec sqlQuery + */ + + /** + * Constructs a new DatabaseViewSpec. + * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec + * @classdesc Represents a DatabaseViewSpec. + * @implements IDatabaseViewSpec + * @constructor + * @param {google.cloud.datacatalog.v1.DatabaseTableSpec.IDatabaseViewSpec=} [properties] Properties to set + */ + function DatabaseViewSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DatabaseViewSpec viewType. + * @member {google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType} viewType + * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec + * @instance + */ + DatabaseViewSpec.prototype.viewType = 0; + + /** + * DatabaseViewSpec baseTable. + * @member {string|null|undefined} baseTable + * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec + * @instance + */ + DatabaseViewSpec.prototype.baseTable = null; + + /** + * DatabaseViewSpec sqlQuery. + * @member {string|null|undefined} sqlQuery + * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec + * @instance + */ + DatabaseViewSpec.prototype.sqlQuery = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DatabaseViewSpec sourceDefinition. + * @member {"baseTable"|"sqlQuery"|undefined} sourceDefinition + * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec + * @instance + */ + Object.defineProperty(DatabaseViewSpec.prototype, "sourceDefinition", { + get: $util.oneOfGetter($oneOfFields = ["baseTable", "sqlQuery"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DatabaseViewSpec instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec + * @static + * @param {google.cloud.datacatalog.v1.DatabaseTableSpec.IDatabaseViewSpec=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec} DatabaseViewSpec instance + */ + DatabaseViewSpec.create = function create(properties) { + return new DatabaseViewSpec(properties); + }; + + /** + * Encodes the specified DatabaseViewSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec + * @static + * @param {google.cloud.datacatalog.v1.DatabaseTableSpec.IDatabaseViewSpec} message DatabaseViewSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseViewSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.viewType != null && Object.hasOwnProperty.call(message, "viewType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.viewType); + if (message.baseTable != null && Object.hasOwnProperty.call(message, "baseTable")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.baseTable); + if (message.sqlQuery != null && Object.hasOwnProperty.call(message, "sqlQuery")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sqlQuery); + return writer; + }; + + /** + * Encodes the specified DatabaseViewSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec + * @static + * @param {google.cloud.datacatalog.v1.DatabaseTableSpec.IDatabaseViewSpec} message DatabaseViewSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseViewSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatabaseViewSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec + * @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.DatabaseViewSpec} DatabaseViewSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseViewSpec.decode = function decode(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.DatabaseViewSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.viewType = reader.int32(); + break; + } + case 2: { + message.baseTable = reader.string(); + break; + } + case 3: { + message.sqlQuery = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DatabaseViewSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec} DatabaseViewSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseViewSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatabaseViewSpec message. + * @function verify + * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatabaseViewSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.viewType != null && message.hasOwnProperty("viewType")) + switch (message.viewType) { + default: + return "viewType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.baseTable != null && message.hasOwnProperty("baseTable")) { + properties.sourceDefinition = 1; + if (!$util.isString(message.baseTable)) + return "baseTable: string expected"; + } + if (message.sqlQuery != null && message.hasOwnProperty("sqlQuery")) { + if (properties.sourceDefinition === 1) + return "sourceDefinition: multiple values"; + properties.sourceDefinition = 1; + if (!$util.isString(message.sqlQuery)) + return "sqlQuery: string expected"; + } + return null; + }; + + /** + * Creates a DatabaseViewSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec} DatabaseViewSpec + */ + DatabaseViewSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec) + return object; + var message = new $root.google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec(); + switch (object.viewType) { + default: + if (typeof object.viewType === "number") { + message.viewType = object.viewType; + break; + } + break; + case "VIEW_TYPE_UNSPECIFIED": + case 0: + message.viewType = 0; + break; + case "STANDARD_VIEW": + case 1: + message.viewType = 1; + break; + case "MATERIALIZED_VIEW": + case 2: + message.viewType = 2; + break; + } + if (object.baseTable != null) + message.baseTable = String(object.baseTable); + if (object.sqlQuery != null) + message.sqlQuery = String(object.sqlQuery); + return message; + }; + + /** + * Creates a plain object from a DatabaseViewSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec + * @static + * @param {google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec} message DatabaseViewSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatabaseViewSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.viewType = options.enums === String ? "VIEW_TYPE_UNSPECIFIED" : 0; + if (message.viewType != null && message.hasOwnProperty("viewType")) + object.viewType = options.enums === String ? $root.google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType[message.viewType] === undefined ? message.viewType : $root.google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType[message.viewType] : message.viewType; + if (message.baseTable != null && message.hasOwnProperty("baseTable")) { + object.baseTable = message.baseTable; + if (options.oneofs) + object.sourceDefinition = "baseTable"; + } + if (message.sqlQuery != null && message.hasOwnProperty("sqlQuery")) { + object.sqlQuery = message.sqlQuery; + if (options.oneofs) + object.sourceDefinition = "sqlQuery"; + } + return object; + }; + + /** + * Converts this DatabaseViewSpec to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec + * @instance + * @returns {Object.} JSON object + */ + DatabaseViewSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatabaseViewSpec + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatabaseViewSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec"; + }; + + /** + * ViewType enum. + * @name google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType + * @enum {number} + * @property {number} VIEW_TYPE_UNSPECIFIED=0 VIEW_TYPE_UNSPECIFIED value + * @property {number} STANDARD_VIEW=1 STANDARD_VIEW value + * @property {number} MATERIALIZED_VIEW=2 MATERIALIZED_VIEW value + */ + DatabaseViewSpec.ViewType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VIEW_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STANDARD_VIEW"] = 1; + values[valuesById[2] = "MATERIALIZED_VIEW"] = 2; + return values; + })(); + + return DatabaseViewSpec; + })(); + + 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.DatasetSpec = (function() { + + /** + * Properties of a DatasetSpec. + * @memberof google.cloud.datacatalog.v1 + * @interface IDatasetSpec + * @property {google.cloud.datacatalog.v1.IVertexDatasetSpec|null} [vertexDatasetSpec] DatasetSpec vertexDatasetSpec + */ + + /** + * Constructs a new DatasetSpec. + * @memberof google.cloud.datacatalog.v1 + * @classdesc Represents a DatasetSpec. + * @implements IDatasetSpec + * @constructor + * @param {google.cloud.datacatalog.v1.IDatasetSpec=} [properties] Properties to set + */ + function DatasetSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DatasetSpec vertexDatasetSpec. + * @member {google.cloud.datacatalog.v1.IVertexDatasetSpec|null|undefined} vertexDatasetSpec + * @memberof google.cloud.datacatalog.v1.DatasetSpec + * @instance + */ + DatasetSpec.prototype.vertexDatasetSpec = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DatasetSpec systemSpec. + * @member {"vertexDatasetSpec"|undefined} systemSpec + * @memberof google.cloud.datacatalog.v1.DatasetSpec + * @instance + */ + Object.defineProperty(DatasetSpec.prototype, "systemSpec", { + get: $util.oneOfGetter($oneOfFields = ["vertexDatasetSpec"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DatasetSpec instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.DatasetSpec + * @static + * @param {google.cloud.datacatalog.v1.IDatasetSpec=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.DatasetSpec} DatasetSpec instance + */ + DatasetSpec.create = function create(properties) { + return new DatasetSpec(properties); + }; + + /** + * Encodes the specified DatasetSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.DatasetSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.DatasetSpec + * @static + * @param {google.cloud.datacatalog.v1.IDatasetSpec} message DatasetSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatasetSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.vertexDatasetSpec != null && Object.hasOwnProperty.call(message, "vertexDatasetSpec")) + $root.google.cloud.datacatalog.v1.VertexDatasetSpec.encode(message.vertexDatasetSpec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DatasetSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DatasetSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.DatasetSpec + * @static + * @param {google.cloud.datacatalog.v1.IDatasetSpec} message DatasetSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatasetSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatasetSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.DatasetSpec + * @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.DatasetSpec} DatasetSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatasetSpec.decode = function decode(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.DatasetSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.vertexDatasetSpec = $root.google.cloud.datacatalog.v1.VertexDatasetSpec.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DatasetSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.DatasetSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.DatasetSpec} DatasetSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatasetSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatasetSpec message. + * @function verify + * @memberof google.cloud.datacatalog.v1.DatasetSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatasetSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.vertexDatasetSpec != null && message.hasOwnProperty("vertexDatasetSpec")) { + properties.systemSpec = 1; + { + var error = $root.google.cloud.datacatalog.v1.VertexDatasetSpec.verify(message.vertexDatasetSpec); + if (error) + return "vertexDatasetSpec." + error; + } + } + return null; + }; + + /** + * Creates a DatasetSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.DatasetSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.DatasetSpec} DatasetSpec + */ + DatasetSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.DatasetSpec) + return object; + var message = new $root.google.cloud.datacatalog.v1.DatasetSpec(); + if (object.vertexDatasetSpec != null) { + if (typeof object.vertexDatasetSpec !== "object") + throw TypeError(".google.cloud.datacatalog.v1.DatasetSpec.vertexDatasetSpec: object expected"); + message.vertexDatasetSpec = $root.google.cloud.datacatalog.v1.VertexDatasetSpec.fromObject(object.vertexDatasetSpec); + } + return message; + }; + + /** + * Creates a plain object from a DatasetSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.DatasetSpec + * @static + * @param {google.cloud.datacatalog.v1.DatasetSpec} message DatasetSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatasetSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.vertexDatasetSpec != null && message.hasOwnProperty("vertexDatasetSpec")) { + object.vertexDatasetSpec = $root.google.cloud.datacatalog.v1.VertexDatasetSpec.toObject(message.vertexDatasetSpec, options); + if (options.oneofs) + object.systemSpec = "vertexDatasetSpec"; + } + return object; + }; + + /** + * Converts this DatasetSpec to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.DatasetSpec + * @instance + * @returns {Object.} JSON object + */ + DatasetSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatasetSpec + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.DatasetSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatasetSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.DatasetSpec"; + }; + + return DatasetSpec; + })(); + + v1.SqlDatabaseSystemSpec = (function() { + + /** + * Properties of a SqlDatabaseSystemSpec. + * @memberof google.cloud.datacatalog.v1 + * @interface ISqlDatabaseSystemSpec + * @property {string|null} [sqlEngine] SqlDatabaseSystemSpec sqlEngine + * @property {string|null} [databaseVersion] SqlDatabaseSystemSpec databaseVersion + * @property {string|null} [instanceHost] SqlDatabaseSystemSpec instanceHost + */ + + /** + * Constructs a new SqlDatabaseSystemSpec. + * @memberof google.cloud.datacatalog.v1 + * @classdesc Represents a SqlDatabaseSystemSpec. + * @implements ISqlDatabaseSystemSpec + * @constructor + * @param {google.cloud.datacatalog.v1.ISqlDatabaseSystemSpec=} [properties] Properties to set + */ + function SqlDatabaseSystemSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SqlDatabaseSystemSpec sqlEngine. + * @member {string} sqlEngine + * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec + * @instance + */ + SqlDatabaseSystemSpec.prototype.sqlEngine = ""; + + /** + * SqlDatabaseSystemSpec databaseVersion. + * @member {string} databaseVersion + * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec + * @instance + */ + SqlDatabaseSystemSpec.prototype.databaseVersion = ""; + + /** + * SqlDatabaseSystemSpec instanceHost. + * @member {string} instanceHost + * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec + * @instance + */ + SqlDatabaseSystemSpec.prototype.instanceHost = ""; + + /** + * Creates a new SqlDatabaseSystemSpec instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec + * @static + * @param {google.cloud.datacatalog.v1.ISqlDatabaseSystemSpec=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.SqlDatabaseSystemSpec} SqlDatabaseSystemSpec instance + */ + SqlDatabaseSystemSpec.create = function create(properties) { + return new SqlDatabaseSystemSpec(properties); + }; + + /** + * Encodes the specified SqlDatabaseSystemSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.SqlDatabaseSystemSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec + * @static + * @param {google.cloud.datacatalog.v1.ISqlDatabaseSystemSpec} message SqlDatabaseSystemSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SqlDatabaseSystemSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sqlEngine != null && Object.hasOwnProperty.call(message, "sqlEngine")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sqlEngine); + if (message.databaseVersion != null && Object.hasOwnProperty.call(message, "databaseVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.databaseVersion); + if (message.instanceHost != null && Object.hasOwnProperty.call(message, "instanceHost")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.instanceHost); + return writer; + }; + + /** + * Encodes the specified SqlDatabaseSystemSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.SqlDatabaseSystemSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec + * @static + * @param {google.cloud.datacatalog.v1.ISqlDatabaseSystemSpec} message SqlDatabaseSystemSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SqlDatabaseSystemSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SqlDatabaseSystemSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec + * @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.SqlDatabaseSystemSpec} SqlDatabaseSystemSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SqlDatabaseSystemSpec.decode = function decode(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.SqlDatabaseSystemSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sqlEngine = reader.string(); + break; + } + case 2: { + message.databaseVersion = reader.string(); + break; + } + case 3: { + message.instanceHost = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SqlDatabaseSystemSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.SqlDatabaseSystemSpec} SqlDatabaseSystemSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SqlDatabaseSystemSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SqlDatabaseSystemSpec message. + * @function verify + * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SqlDatabaseSystemSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sqlEngine != null && message.hasOwnProperty("sqlEngine")) + if (!$util.isString(message.sqlEngine)) + return "sqlEngine: string expected"; + if (message.databaseVersion != null && message.hasOwnProperty("databaseVersion")) + if (!$util.isString(message.databaseVersion)) + return "databaseVersion: string expected"; + if (message.instanceHost != null && message.hasOwnProperty("instanceHost")) + if (!$util.isString(message.instanceHost)) + return "instanceHost: string expected"; + return null; + }; + + /** + * Creates a SqlDatabaseSystemSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.SqlDatabaseSystemSpec} SqlDatabaseSystemSpec + */ + SqlDatabaseSystemSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.SqlDatabaseSystemSpec) + return object; + var message = new $root.google.cloud.datacatalog.v1.SqlDatabaseSystemSpec(); + if (object.sqlEngine != null) + message.sqlEngine = String(object.sqlEngine); + if (object.databaseVersion != null) + message.databaseVersion = String(object.databaseVersion); + if (object.instanceHost != null) + message.instanceHost = String(object.instanceHost); + return message; + }; + + /** + * Creates a plain object from a SqlDatabaseSystemSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec + * @static + * @param {google.cloud.datacatalog.v1.SqlDatabaseSystemSpec} message SqlDatabaseSystemSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SqlDatabaseSystemSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sqlEngine = ""; + object.databaseVersion = ""; + object.instanceHost = ""; + } + if (message.sqlEngine != null && message.hasOwnProperty("sqlEngine")) + object.sqlEngine = message.sqlEngine; + if (message.databaseVersion != null && message.hasOwnProperty("databaseVersion")) + object.databaseVersion = message.databaseVersion; + if (message.instanceHost != null && message.hasOwnProperty("instanceHost")) + object.instanceHost = message.instanceHost; + return object; + }; + + /** + * Converts this SqlDatabaseSystemSpec to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec + * @instance + * @returns {Object.} JSON object + */ + SqlDatabaseSystemSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SqlDatabaseSystemSpec + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SqlDatabaseSystemSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.SqlDatabaseSystemSpec"; + }; + + return SqlDatabaseSystemSpec; + })(); + + v1.LookerSystemSpec = (function() { + + /** + * Properties of a LookerSystemSpec. + * @memberof google.cloud.datacatalog.v1 + * @interface ILookerSystemSpec + * @property {string|null} [parentInstanceId] LookerSystemSpec parentInstanceId + * @property {string|null} [parentInstanceDisplayName] LookerSystemSpec parentInstanceDisplayName + * @property {string|null} [parentModelId] LookerSystemSpec parentModelId + * @property {string|null} [parentModelDisplayName] LookerSystemSpec parentModelDisplayName + * @property {string|null} [parentViewId] LookerSystemSpec parentViewId + * @property {string|null} [parentViewDisplayName] LookerSystemSpec parentViewDisplayName + */ + + /** + * Constructs a new LookerSystemSpec. + * @memberof google.cloud.datacatalog.v1 + * @classdesc Represents a LookerSystemSpec. + * @implements ILookerSystemSpec + * @constructor + * @param {google.cloud.datacatalog.v1.ILookerSystemSpec=} [properties] Properties to set + */ + function LookerSystemSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LookerSystemSpec parentInstanceId. + * @member {string} parentInstanceId + * @memberof google.cloud.datacatalog.v1.LookerSystemSpec + * @instance + */ + LookerSystemSpec.prototype.parentInstanceId = ""; + + /** + * LookerSystemSpec parentInstanceDisplayName. + * @member {string} parentInstanceDisplayName + * @memberof google.cloud.datacatalog.v1.LookerSystemSpec + * @instance + */ + LookerSystemSpec.prototype.parentInstanceDisplayName = ""; + + /** + * LookerSystemSpec parentModelId. + * @member {string} parentModelId + * @memberof google.cloud.datacatalog.v1.LookerSystemSpec + * @instance + */ + LookerSystemSpec.prototype.parentModelId = ""; + + /** + * LookerSystemSpec parentModelDisplayName. + * @member {string} parentModelDisplayName + * @memberof google.cloud.datacatalog.v1.LookerSystemSpec + * @instance + */ + LookerSystemSpec.prototype.parentModelDisplayName = ""; + + /** + * LookerSystemSpec parentViewId. + * @member {string} parentViewId + * @memberof google.cloud.datacatalog.v1.LookerSystemSpec + * @instance + */ + LookerSystemSpec.prototype.parentViewId = ""; + + /** + * LookerSystemSpec parentViewDisplayName. + * @member {string} parentViewDisplayName + * @memberof google.cloud.datacatalog.v1.LookerSystemSpec + * @instance + */ + LookerSystemSpec.prototype.parentViewDisplayName = ""; + + /** + * Creates a new LookerSystemSpec instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.LookerSystemSpec + * @static + * @param {google.cloud.datacatalog.v1.ILookerSystemSpec=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.LookerSystemSpec} LookerSystemSpec instance + */ + LookerSystemSpec.create = function create(properties) { + return new LookerSystemSpec(properties); + }; + + /** + * Encodes the specified LookerSystemSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.LookerSystemSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.LookerSystemSpec + * @static + * @param {google.cloud.datacatalog.v1.ILookerSystemSpec} message LookerSystemSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LookerSystemSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parentInstanceId != null && Object.hasOwnProperty.call(message, "parentInstanceId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parentInstanceId); + if (message.parentInstanceDisplayName != null && Object.hasOwnProperty.call(message, "parentInstanceDisplayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.parentInstanceDisplayName); + if (message.parentModelId != null && Object.hasOwnProperty.call(message, "parentModelId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.parentModelId); + if (message.parentModelDisplayName != null && Object.hasOwnProperty.call(message, "parentModelDisplayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.parentModelDisplayName); + if (message.parentViewId != null && Object.hasOwnProperty.call(message, "parentViewId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.parentViewId); + if (message.parentViewDisplayName != null && Object.hasOwnProperty.call(message, "parentViewDisplayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.parentViewDisplayName); + return writer; + }; + + /** + * Encodes the specified LookerSystemSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.LookerSystemSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.LookerSystemSpec + * @static + * @param {google.cloud.datacatalog.v1.ILookerSystemSpec} message LookerSystemSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LookerSystemSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LookerSystemSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.LookerSystemSpec + * @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.LookerSystemSpec} LookerSystemSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LookerSystemSpec.decode = function decode(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.LookerSystemSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parentInstanceId = reader.string(); + break; + } + case 2: { + message.parentInstanceDisplayName = reader.string(); + break; + } + case 3: { + message.parentModelId = reader.string(); + break; + } + case 4: { + message.parentModelDisplayName = reader.string(); + break; + } + case 5: { + message.parentViewId = reader.string(); + break; + } + case 6: { + message.parentViewDisplayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LookerSystemSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.LookerSystemSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.LookerSystemSpec} LookerSystemSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LookerSystemSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LookerSystemSpec message. + * @function verify + * @memberof google.cloud.datacatalog.v1.LookerSystemSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LookerSystemSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parentInstanceId != null && message.hasOwnProperty("parentInstanceId")) + if (!$util.isString(message.parentInstanceId)) + return "parentInstanceId: string expected"; + if (message.parentInstanceDisplayName != null && message.hasOwnProperty("parentInstanceDisplayName")) + if (!$util.isString(message.parentInstanceDisplayName)) + return "parentInstanceDisplayName: string expected"; + if (message.parentModelId != null && message.hasOwnProperty("parentModelId")) + if (!$util.isString(message.parentModelId)) + return "parentModelId: string expected"; + if (message.parentModelDisplayName != null && message.hasOwnProperty("parentModelDisplayName")) + if (!$util.isString(message.parentModelDisplayName)) + return "parentModelDisplayName: string expected"; + if (message.parentViewId != null && message.hasOwnProperty("parentViewId")) + if (!$util.isString(message.parentViewId)) + return "parentViewId: string expected"; + if (message.parentViewDisplayName != null && message.hasOwnProperty("parentViewDisplayName")) + if (!$util.isString(message.parentViewDisplayName)) + return "parentViewDisplayName: string expected"; + return null; + }; + + /** + * Creates a LookerSystemSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.LookerSystemSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.LookerSystemSpec} LookerSystemSpec + */ + LookerSystemSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.LookerSystemSpec) + return object; + var message = new $root.google.cloud.datacatalog.v1.LookerSystemSpec(); + if (object.parentInstanceId != null) + message.parentInstanceId = String(object.parentInstanceId); + if (object.parentInstanceDisplayName != null) + message.parentInstanceDisplayName = String(object.parentInstanceDisplayName); + if (object.parentModelId != null) + message.parentModelId = String(object.parentModelId); + if (object.parentModelDisplayName != null) + message.parentModelDisplayName = String(object.parentModelDisplayName); + if (object.parentViewId != null) + message.parentViewId = String(object.parentViewId); + if (object.parentViewDisplayName != null) + message.parentViewDisplayName = String(object.parentViewDisplayName); + return message; + }; + + /** + * Creates a plain object from a LookerSystemSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.LookerSystemSpec + * @static + * @param {google.cloud.datacatalog.v1.LookerSystemSpec} message LookerSystemSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LookerSystemSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parentInstanceId = ""; + object.parentInstanceDisplayName = ""; + object.parentModelId = ""; + object.parentModelDisplayName = ""; + object.parentViewId = ""; + object.parentViewDisplayName = ""; + } + if (message.parentInstanceId != null && message.hasOwnProperty("parentInstanceId")) + object.parentInstanceId = message.parentInstanceId; + if (message.parentInstanceDisplayName != null && message.hasOwnProperty("parentInstanceDisplayName")) + object.parentInstanceDisplayName = message.parentInstanceDisplayName; + if (message.parentModelId != null && message.hasOwnProperty("parentModelId")) + object.parentModelId = message.parentModelId; + if (message.parentModelDisplayName != null && message.hasOwnProperty("parentModelDisplayName")) + object.parentModelDisplayName = message.parentModelDisplayName; + if (message.parentViewId != null && message.hasOwnProperty("parentViewId")) + object.parentViewId = message.parentViewId; + if (message.parentViewDisplayName != null && message.hasOwnProperty("parentViewDisplayName")) + object.parentViewDisplayName = message.parentViewDisplayName; + return object; + }; + + /** + * Converts this LookerSystemSpec to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.LookerSystemSpec + * @instance + * @returns {Object.} JSON object + */ + LookerSystemSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LookerSystemSpec + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.LookerSystemSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LookerSystemSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.LookerSystemSpec"; + }; + + return LookerSystemSpec; + })(); + + v1.CloudBigtableSystemSpec = (function() { + + /** + * Properties of a CloudBigtableSystemSpec. + * @memberof google.cloud.datacatalog.v1 + * @interface ICloudBigtableSystemSpec + * @property {string|null} [instanceDisplayName] CloudBigtableSystemSpec instanceDisplayName + */ + + /** + * Constructs a new CloudBigtableSystemSpec. + * @memberof google.cloud.datacatalog.v1 + * @classdesc Represents a CloudBigtableSystemSpec. + * @implements ICloudBigtableSystemSpec + * @constructor + * @param {google.cloud.datacatalog.v1.ICloudBigtableSystemSpec=} [properties] Properties to set + */ + function CloudBigtableSystemSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudBigtableSystemSpec instanceDisplayName. + * @member {string} instanceDisplayName + * @memberof google.cloud.datacatalog.v1.CloudBigtableSystemSpec + * @instance + */ + CloudBigtableSystemSpec.prototype.instanceDisplayName = ""; + + /** + * Creates a new CloudBigtableSystemSpec instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.CloudBigtableSystemSpec + * @static + * @param {google.cloud.datacatalog.v1.ICloudBigtableSystemSpec=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.CloudBigtableSystemSpec} CloudBigtableSystemSpec instance + */ + CloudBigtableSystemSpec.create = function create(properties) { + return new CloudBigtableSystemSpec(properties); + }; + + /** + * Encodes the specified CloudBigtableSystemSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.CloudBigtableSystemSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.CloudBigtableSystemSpec + * @static + * @param {google.cloud.datacatalog.v1.ICloudBigtableSystemSpec} message CloudBigtableSystemSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudBigtableSystemSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.instanceDisplayName != null && Object.hasOwnProperty.call(message, "instanceDisplayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.instanceDisplayName); + return writer; + }; + + /** + * Encodes the specified CloudBigtableSystemSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CloudBigtableSystemSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.CloudBigtableSystemSpec + * @static + * @param {google.cloud.datacatalog.v1.ICloudBigtableSystemSpec} message CloudBigtableSystemSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudBigtableSystemSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudBigtableSystemSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.CloudBigtableSystemSpec + * @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.CloudBigtableSystemSpec} CloudBigtableSystemSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudBigtableSystemSpec.decode = function decode(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.CloudBigtableSystemSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.instanceDisplayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudBigtableSystemSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.CloudBigtableSystemSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.CloudBigtableSystemSpec} CloudBigtableSystemSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudBigtableSystemSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudBigtableSystemSpec message. + * @function verify + * @memberof google.cloud.datacatalog.v1.CloudBigtableSystemSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudBigtableSystemSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.instanceDisplayName != null && message.hasOwnProperty("instanceDisplayName")) + if (!$util.isString(message.instanceDisplayName)) + return "instanceDisplayName: string expected"; + return null; + }; + + /** + * Creates a CloudBigtableSystemSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.CloudBigtableSystemSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.CloudBigtableSystemSpec} CloudBigtableSystemSpec + */ + CloudBigtableSystemSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.CloudBigtableSystemSpec) + return object; + var message = new $root.google.cloud.datacatalog.v1.CloudBigtableSystemSpec(); + if (object.instanceDisplayName != null) + message.instanceDisplayName = String(object.instanceDisplayName); + return message; + }; + + /** + * Creates a plain object from a CloudBigtableSystemSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.CloudBigtableSystemSpec + * @static + * @param {google.cloud.datacatalog.v1.CloudBigtableSystemSpec} message CloudBigtableSystemSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudBigtableSystemSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.instanceDisplayName = ""; + if (message.instanceDisplayName != null && message.hasOwnProperty("instanceDisplayName")) + object.instanceDisplayName = message.instanceDisplayName; + return object; + }; + + /** + * Converts this CloudBigtableSystemSpec to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.CloudBigtableSystemSpec + * @instance + * @returns {Object.} JSON object + */ + CloudBigtableSystemSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudBigtableSystemSpec + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.CloudBigtableSystemSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudBigtableSystemSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.CloudBigtableSystemSpec"; + }; + + return CloudBigtableSystemSpec; + })(); + + v1.CloudBigtableInstanceSpec = (function() { + + /** + * Properties of a CloudBigtableInstanceSpec. + * @memberof google.cloud.datacatalog.v1 + * @interface ICloudBigtableInstanceSpec + * @property {Array.|null} [cloudBigtableClusterSpecs] CloudBigtableInstanceSpec cloudBigtableClusterSpecs + */ + + /** + * Constructs a new CloudBigtableInstanceSpec. + * @memberof google.cloud.datacatalog.v1 + * @classdesc Represents a CloudBigtableInstanceSpec. + * @implements ICloudBigtableInstanceSpec + * @constructor + * @param {google.cloud.datacatalog.v1.ICloudBigtableInstanceSpec=} [properties] Properties to set + */ + function CloudBigtableInstanceSpec(properties) { + this.cloudBigtableClusterSpecs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudBigtableInstanceSpec cloudBigtableClusterSpecs. + * @member {Array.} cloudBigtableClusterSpecs + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec + * @instance + */ + CloudBigtableInstanceSpec.prototype.cloudBigtableClusterSpecs = $util.emptyArray; + + /** + * Creates a new CloudBigtableInstanceSpec instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec + * @static + * @param {google.cloud.datacatalog.v1.ICloudBigtableInstanceSpec=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.CloudBigtableInstanceSpec} CloudBigtableInstanceSpec instance + */ + CloudBigtableInstanceSpec.create = function create(properties) { + return new CloudBigtableInstanceSpec(properties); + }; + + /** + * Encodes the specified CloudBigtableInstanceSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec + * @static + * @param {google.cloud.datacatalog.v1.ICloudBigtableInstanceSpec} message CloudBigtableInstanceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudBigtableInstanceSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cloudBigtableClusterSpecs != null && message.cloudBigtableClusterSpecs.length) + for (var i = 0; i < message.cloudBigtableClusterSpecs.length; ++i) + $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec.encode(message.cloudBigtableClusterSpecs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CloudBigtableInstanceSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec + * @static + * @param {google.cloud.datacatalog.v1.ICloudBigtableInstanceSpec} message CloudBigtableInstanceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudBigtableInstanceSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudBigtableInstanceSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec + * @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.CloudBigtableInstanceSpec} CloudBigtableInstanceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudBigtableInstanceSpec.decode = function decode(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.CloudBigtableInstanceSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.cloudBigtableClusterSpecs && message.cloudBigtableClusterSpecs.length)) + message.cloudBigtableClusterSpecs = []; + message.cloudBigtableClusterSpecs.push($root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudBigtableInstanceSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.CloudBigtableInstanceSpec} CloudBigtableInstanceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudBigtableInstanceSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudBigtableInstanceSpec message. + * @function verify + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudBigtableInstanceSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cloudBigtableClusterSpecs != null && message.hasOwnProperty("cloudBigtableClusterSpecs")) { + if (!Array.isArray(message.cloudBigtableClusterSpecs)) + return "cloudBigtableClusterSpecs: array expected"; + for (var i = 0; i < message.cloudBigtableClusterSpecs.length; ++i) { + var error = $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec.verify(message.cloudBigtableClusterSpecs[i]); + if (error) + return "cloudBigtableClusterSpecs." + error; + } + } + return null; + }; + + /** + * Creates a CloudBigtableInstanceSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.CloudBigtableInstanceSpec} CloudBigtableInstanceSpec + */ + CloudBigtableInstanceSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec) + return object; + var message = new $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec(); + if (object.cloudBigtableClusterSpecs) { + if (!Array.isArray(object.cloudBigtableClusterSpecs)) + throw TypeError(".google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.cloudBigtableClusterSpecs: array expected"); + message.cloudBigtableClusterSpecs = []; + for (var i = 0; i < object.cloudBigtableClusterSpecs.length; ++i) { + if (typeof object.cloudBigtableClusterSpecs[i] !== "object") + throw TypeError(".google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.cloudBigtableClusterSpecs: object expected"); + message.cloudBigtableClusterSpecs[i] = $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec.fromObject(object.cloudBigtableClusterSpecs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CloudBigtableInstanceSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec + * @static + * @param {google.cloud.datacatalog.v1.CloudBigtableInstanceSpec} message CloudBigtableInstanceSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudBigtableInstanceSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cloudBigtableClusterSpecs = []; + if (message.cloudBigtableClusterSpecs && message.cloudBigtableClusterSpecs.length) { + object.cloudBigtableClusterSpecs = []; + for (var j = 0; j < message.cloudBigtableClusterSpecs.length; ++j) + object.cloudBigtableClusterSpecs[j] = $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec.toObject(message.cloudBigtableClusterSpecs[j], options); + } + return object; + }; + + /** + * Converts this CloudBigtableInstanceSpec to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec + * @instance + * @returns {Object.} JSON object + */ + CloudBigtableInstanceSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudBigtableInstanceSpec + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudBigtableInstanceSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.CloudBigtableInstanceSpec"; + }; + + CloudBigtableInstanceSpec.CloudBigtableClusterSpec = (function() { + + /** + * Properties of a CloudBigtableClusterSpec. + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec + * @interface ICloudBigtableClusterSpec + * @property {string|null} [displayName] CloudBigtableClusterSpec displayName + * @property {string|null} [location] CloudBigtableClusterSpec location + * @property {string|null} [type] CloudBigtableClusterSpec type + * @property {string|null} [linkedResource] CloudBigtableClusterSpec linkedResource + */ + + /** + * Constructs a new CloudBigtableClusterSpec. + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec + * @classdesc Represents a CloudBigtableClusterSpec. + * @implements ICloudBigtableClusterSpec + * @constructor + * @param {google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.ICloudBigtableClusterSpec=} [properties] Properties to set + */ + function CloudBigtableClusterSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudBigtableClusterSpec displayName. + * @member {string} displayName + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec + * @instance + */ + CloudBigtableClusterSpec.prototype.displayName = ""; + + /** + * CloudBigtableClusterSpec location. + * @member {string} location + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec + * @instance + */ + CloudBigtableClusterSpec.prototype.location = ""; + + /** + * CloudBigtableClusterSpec type. + * @member {string} type + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec + * @instance + */ + CloudBigtableClusterSpec.prototype.type = ""; + + /** + * CloudBigtableClusterSpec linkedResource. + * @member {string} linkedResource + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec + * @instance + */ + CloudBigtableClusterSpec.prototype.linkedResource = ""; + + /** + * Creates a new CloudBigtableClusterSpec instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec + * @static + * @param {google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.ICloudBigtableClusterSpec=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec} CloudBigtableClusterSpec instance + */ + CloudBigtableClusterSpec.create = function create(properties) { + return new CloudBigtableClusterSpec(properties); + }; + + /** + * Encodes the specified CloudBigtableClusterSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec + * @static + * @param {google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.ICloudBigtableClusterSpec} message CloudBigtableClusterSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudBigtableClusterSpec.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.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.linkedResource != null && Object.hasOwnProperty.call(message, "linkedResource")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.linkedResource); + return writer; + }; + + /** + * Encodes the specified CloudBigtableClusterSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec + * @static + * @param {google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.ICloudBigtableClusterSpec} message CloudBigtableClusterSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudBigtableClusterSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudBigtableClusterSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec + * @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.CloudBigtableInstanceSpec.CloudBigtableClusterSpec} CloudBigtableClusterSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudBigtableClusterSpec.decode = function decode(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.CloudBigtableInstanceSpec.CloudBigtableClusterSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.location = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 4: { + message.linkedResource = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudBigtableClusterSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec} CloudBigtableClusterSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudBigtableClusterSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudBigtableClusterSpec message. + * @function verify + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudBigtableClusterSpec.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.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) + if (!$util.isString(message.linkedResource)) + return "linkedResource: string expected"; + return null; + }; + + /** + * Creates a CloudBigtableClusterSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec} CloudBigtableClusterSpec + */ + CloudBigtableClusterSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec) + return object; + var message = new $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.location != null) + message.location = String(object.location); + if (object.type != null) + message.type = String(object.type); + if (object.linkedResource != null) + message.linkedResource = String(object.linkedResource); + return message; + }; + + /** + * Creates a plain object from a CloudBigtableClusterSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec + * @static + * @param {google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec} message CloudBigtableClusterSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudBigtableClusterSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.location = ""; + object.type = ""; + object.linkedResource = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) + object.linkedResource = message.linkedResource; + return object; + }; + + /** + * Converts this CloudBigtableClusterSpec to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec + * @instance + * @returns {Object.} JSON object + */ + CloudBigtableClusterSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudBigtableClusterSpec + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudBigtableClusterSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec"; + }; + + return CloudBigtableClusterSpec; + })(); + + return CloudBigtableInstanceSpec; + })(); + + v1.ServiceSpec = (function() { + + /** + * Properties of a ServiceSpec. + * @memberof google.cloud.datacatalog.v1 + * @interface IServiceSpec + * @property {google.cloud.datacatalog.v1.ICloudBigtableInstanceSpec|null} [cloudBigtableInstanceSpec] ServiceSpec cloudBigtableInstanceSpec + */ + + /** + * Constructs a new ServiceSpec. + * @memberof google.cloud.datacatalog.v1 + * @classdesc Represents a ServiceSpec. + * @implements IServiceSpec + * @constructor + * @param {google.cloud.datacatalog.v1.IServiceSpec=} [properties] Properties to set + */ + function ServiceSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceSpec cloudBigtableInstanceSpec. + * @member {google.cloud.datacatalog.v1.ICloudBigtableInstanceSpec|null|undefined} cloudBigtableInstanceSpec + * @memberof google.cloud.datacatalog.v1.ServiceSpec + * @instance + */ + ServiceSpec.prototype.cloudBigtableInstanceSpec = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ServiceSpec systemSpec. + * @member {"cloudBigtableInstanceSpec"|undefined} systemSpec + * @memberof google.cloud.datacatalog.v1.ServiceSpec + * @instance + */ + Object.defineProperty(ServiceSpec.prototype, "systemSpec", { + get: $util.oneOfGetter($oneOfFields = ["cloudBigtableInstanceSpec"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ServiceSpec instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.ServiceSpec + * @static + * @param {google.cloud.datacatalog.v1.IServiceSpec=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.ServiceSpec} ServiceSpec instance + */ + ServiceSpec.create = function create(properties) { + return new ServiceSpec(properties); + }; + + /** + * Encodes the specified ServiceSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.ServiceSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.ServiceSpec + * @static + * @param {google.cloud.datacatalog.v1.IServiceSpec} message ServiceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cloudBigtableInstanceSpec != null && Object.hasOwnProperty.call(message, "cloudBigtableInstanceSpec")) + $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.encode(message.cloudBigtableInstanceSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ServiceSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.ServiceSpec + * @static + * @param {google.cloud.datacatalog.v1.IServiceSpec} message ServiceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.ServiceSpec + * @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.ServiceSpec} ServiceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceSpec.decode = function decode(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.ServiceSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cloudBigtableInstanceSpec = $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.ServiceSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.ServiceSpec} ServiceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceSpec message. + * @function verify + * @memberof google.cloud.datacatalog.v1.ServiceSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.cloudBigtableInstanceSpec != null && message.hasOwnProperty("cloudBigtableInstanceSpec")) { + properties.systemSpec = 1; + { + var error = $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.verify(message.cloudBigtableInstanceSpec); + if (error) + return "cloudBigtableInstanceSpec." + error; + } + } + return null; + }; + + /** + * Creates a ServiceSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.ServiceSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.ServiceSpec} ServiceSpec + */ + ServiceSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.ServiceSpec) + return object; + var message = new $root.google.cloud.datacatalog.v1.ServiceSpec(); + if (object.cloudBigtableInstanceSpec != null) { + if (typeof object.cloudBigtableInstanceSpec !== "object") + throw TypeError(".google.cloud.datacatalog.v1.ServiceSpec.cloudBigtableInstanceSpec: object expected"); + message.cloudBigtableInstanceSpec = $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.fromObject(object.cloudBigtableInstanceSpec); + } + return message; + }; + + /** + * Creates a plain object from a ServiceSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.ServiceSpec + * @static + * @param {google.cloud.datacatalog.v1.ServiceSpec} message ServiceSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.cloudBigtableInstanceSpec != null && message.hasOwnProperty("cloudBigtableInstanceSpec")) { + object.cloudBigtableInstanceSpec = $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.toObject(message.cloudBigtableInstanceSpec, options); + if (options.oneofs) + object.systemSpec = "cloudBigtableInstanceSpec"; + } + return object; + }; + + /** + * Converts this ServiceSpec to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.ServiceSpec + * @instance + * @returns {Object.} JSON object + */ + ServiceSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceSpec + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.ServiceSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.ServiceSpec"; + }; + + return ServiceSpec; + })(); + + v1.VertexModelSourceInfo = (function() { + + /** + * Properties of a VertexModelSourceInfo. + * @memberof google.cloud.datacatalog.v1 + * @interface IVertexModelSourceInfo + * @property {google.cloud.datacatalog.v1.VertexModelSourceInfo.ModelSourceType|null} [sourceType] VertexModelSourceInfo sourceType + * @property {boolean|null} [copy] VertexModelSourceInfo copy + */ + + /** + * Constructs a new VertexModelSourceInfo. + * @memberof google.cloud.datacatalog.v1 + * @classdesc Represents a VertexModelSourceInfo. + * @implements IVertexModelSourceInfo + * @constructor + * @param {google.cloud.datacatalog.v1.IVertexModelSourceInfo=} [properties] Properties to set + */ + function VertexModelSourceInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VertexModelSourceInfo sourceType. + * @member {google.cloud.datacatalog.v1.VertexModelSourceInfo.ModelSourceType} sourceType + * @memberof google.cloud.datacatalog.v1.VertexModelSourceInfo + * @instance + */ + VertexModelSourceInfo.prototype.sourceType = 0; + + /** + * VertexModelSourceInfo copy. + * @member {boolean} copy + * @memberof google.cloud.datacatalog.v1.VertexModelSourceInfo + * @instance + */ + VertexModelSourceInfo.prototype.copy = false; + + /** + * Creates a new VertexModelSourceInfo instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.VertexModelSourceInfo + * @static + * @param {google.cloud.datacatalog.v1.IVertexModelSourceInfo=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.VertexModelSourceInfo} VertexModelSourceInfo instance + */ + VertexModelSourceInfo.create = function create(properties) { + return new VertexModelSourceInfo(properties); + }; + + /** + * Encodes the specified VertexModelSourceInfo message. Does not implicitly {@link google.cloud.datacatalog.v1.VertexModelSourceInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.VertexModelSourceInfo + * @static + * @param {google.cloud.datacatalog.v1.IVertexModelSourceInfo} message VertexModelSourceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VertexModelSourceInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sourceType); + if (message.copy != null && Object.hasOwnProperty.call(message, "copy")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.copy); + return writer; + }; + + /** + * Encodes the specified VertexModelSourceInfo message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.VertexModelSourceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.VertexModelSourceInfo + * @static + * @param {google.cloud.datacatalog.v1.IVertexModelSourceInfo} message VertexModelSourceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VertexModelSourceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VertexModelSourceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.VertexModelSourceInfo + * @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.VertexModelSourceInfo} VertexModelSourceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VertexModelSourceInfo.decode = function decode(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.VertexModelSourceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sourceType = reader.int32(); + break; + } + case 2: { + message.copy = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VertexModelSourceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.VertexModelSourceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.VertexModelSourceInfo} VertexModelSourceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VertexModelSourceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VertexModelSourceInfo message. + * @function verify + * @memberof google.cloud.datacatalog.v1.VertexModelSourceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VertexModelSourceInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourceType != null && message.hasOwnProperty("sourceType")) + switch (message.sourceType) { + default: + return "sourceType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.copy != null && message.hasOwnProperty("copy")) + if (typeof message.copy !== "boolean") + return "copy: boolean expected"; + return null; + }; + + /** + * Creates a VertexModelSourceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.VertexModelSourceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.VertexModelSourceInfo} VertexModelSourceInfo + */ + VertexModelSourceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.VertexModelSourceInfo) + return object; + var message = new $root.google.cloud.datacatalog.v1.VertexModelSourceInfo(); + switch (object.sourceType) { + default: + if (typeof object.sourceType === "number") { + message.sourceType = object.sourceType; + break; + } + break; + case "MODEL_SOURCE_TYPE_UNSPECIFIED": + case 0: + message.sourceType = 0; + break; + case "AUTOML": + case 1: + message.sourceType = 1; + break; + case "CUSTOM": + case 2: + message.sourceType = 2; + break; + case "BQML": + case 3: + message.sourceType = 3; + break; + case "MODEL_GARDEN": + case 4: + message.sourceType = 4; + break; + case "GENIE": + case 5: + message.sourceType = 5; + break; + case "CUSTOM_TEXT_EMBEDDING": + case 6: + message.sourceType = 6; + break; + case "MARKETPLACE": + case 7: + message.sourceType = 7; + break; + } + if (object.copy != null) + message.copy = Boolean(object.copy); + return message; + }; + + /** + * Creates a plain object from a VertexModelSourceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.VertexModelSourceInfo + * @static + * @param {google.cloud.datacatalog.v1.VertexModelSourceInfo} message VertexModelSourceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VertexModelSourceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sourceType = options.enums === String ? "MODEL_SOURCE_TYPE_UNSPECIFIED" : 0; + object.copy = false; + } + if (message.sourceType != null && message.hasOwnProperty("sourceType")) + object.sourceType = options.enums === String ? $root.google.cloud.datacatalog.v1.VertexModelSourceInfo.ModelSourceType[message.sourceType] === undefined ? message.sourceType : $root.google.cloud.datacatalog.v1.VertexModelSourceInfo.ModelSourceType[message.sourceType] : message.sourceType; + if (message.copy != null && message.hasOwnProperty("copy")) + object.copy = message.copy; + return object; + }; + + /** + * Converts this VertexModelSourceInfo to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.VertexModelSourceInfo + * @instance + * @returns {Object.} JSON object + */ + VertexModelSourceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VertexModelSourceInfo + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.VertexModelSourceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VertexModelSourceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.VertexModelSourceInfo"; + }; + + /** + * ModelSourceType enum. + * @name google.cloud.datacatalog.v1.VertexModelSourceInfo.ModelSourceType + * @enum {number} + * @property {number} MODEL_SOURCE_TYPE_UNSPECIFIED=0 MODEL_SOURCE_TYPE_UNSPECIFIED value + * @property {number} AUTOML=1 AUTOML value + * @property {number} CUSTOM=2 CUSTOM value + * @property {number} BQML=3 BQML value + * @property {number} MODEL_GARDEN=4 MODEL_GARDEN value + * @property {number} GENIE=5 GENIE value + * @property {number} CUSTOM_TEXT_EMBEDDING=6 CUSTOM_TEXT_EMBEDDING value + * @property {number} MARKETPLACE=7 MARKETPLACE value + */ + VertexModelSourceInfo.ModelSourceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODEL_SOURCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUTOML"] = 1; + values[valuesById[2] = "CUSTOM"] = 2; + values[valuesById[3] = "BQML"] = 3; + values[valuesById[4] = "MODEL_GARDEN"] = 4; + values[valuesById[5] = "GENIE"] = 5; + values[valuesById[6] = "CUSTOM_TEXT_EMBEDDING"] = 6; + values[valuesById[7] = "MARKETPLACE"] = 7; + return values; + })(); + + return VertexModelSourceInfo; + })(); + + v1.VertexModelSpec = (function() { + + /** + * Properties of a VertexModelSpec. + * @memberof google.cloud.datacatalog.v1 + * @interface IVertexModelSpec + * @property {string|null} [versionId] VertexModelSpec versionId + * @property {Array.|null} [versionAliases] VertexModelSpec versionAliases + * @property {string|null} [versionDescription] VertexModelSpec versionDescription + * @property {google.cloud.datacatalog.v1.IVertexModelSourceInfo|null} [vertexModelSourceInfo] VertexModelSpec vertexModelSourceInfo + * @property {string|null} [containerImageUri] VertexModelSpec containerImageUri + */ + + /** + * Constructs a new VertexModelSpec. + * @memberof google.cloud.datacatalog.v1 + * @classdesc Represents a VertexModelSpec. + * @implements IVertexModelSpec + * @constructor + * @param {google.cloud.datacatalog.v1.IVertexModelSpec=} [properties] Properties to set + */ + function VertexModelSpec(properties) { + this.versionAliases = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VertexModelSpec versionId. + * @member {string} versionId + * @memberof google.cloud.datacatalog.v1.VertexModelSpec + * @instance + */ + VertexModelSpec.prototype.versionId = ""; + + /** + * VertexModelSpec versionAliases. + * @member {Array.} versionAliases + * @memberof google.cloud.datacatalog.v1.VertexModelSpec + * @instance + */ + VertexModelSpec.prototype.versionAliases = $util.emptyArray; + + /** + * VertexModelSpec versionDescription. + * @member {string} versionDescription + * @memberof google.cloud.datacatalog.v1.VertexModelSpec + * @instance + */ + VertexModelSpec.prototype.versionDescription = ""; + + /** + * VertexModelSpec vertexModelSourceInfo. + * @member {google.cloud.datacatalog.v1.IVertexModelSourceInfo|null|undefined} vertexModelSourceInfo + * @memberof google.cloud.datacatalog.v1.VertexModelSpec + * @instance + */ + VertexModelSpec.prototype.vertexModelSourceInfo = null; + + /** + * VertexModelSpec containerImageUri. + * @member {string} containerImageUri + * @memberof google.cloud.datacatalog.v1.VertexModelSpec + * @instance + */ + VertexModelSpec.prototype.containerImageUri = ""; + + /** + * Creates a new VertexModelSpec instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.VertexModelSpec + * @static + * @param {google.cloud.datacatalog.v1.IVertexModelSpec=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.VertexModelSpec} VertexModelSpec instance + */ + VertexModelSpec.create = function create(properties) { + return new VertexModelSpec(properties); + }; + + /** + * Encodes the specified VertexModelSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.VertexModelSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.VertexModelSpec + * @static + * @param {google.cloud.datacatalog.v1.IVertexModelSpec} message VertexModelSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VertexModelSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.versionId != null && Object.hasOwnProperty.call(message, "versionId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.versionId); + if (message.versionAliases != null && message.versionAliases.length) + for (var i = 0; i < message.versionAliases.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.versionAliases[i]); + if (message.versionDescription != null && Object.hasOwnProperty.call(message, "versionDescription")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.versionDescription); + if (message.vertexModelSourceInfo != null && Object.hasOwnProperty.call(message, "vertexModelSourceInfo")) + $root.google.cloud.datacatalog.v1.VertexModelSourceInfo.encode(message.vertexModelSourceInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.containerImageUri != null && Object.hasOwnProperty.call(message, "containerImageUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.containerImageUri); + return writer; + }; + + /** + * Encodes the specified VertexModelSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.VertexModelSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.VertexModelSpec + * @static + * @param {google.cloud.datacatalog.v1.IVertexModelSpec} message VertexModelSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VertexModelSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VertexModelSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.VertexModelSpec + * @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.VertexModelSpec} VertexModelSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VertexModelSpec.decode = function decode(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.VertexModelSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.versionId = reader.string(); + break; + } + case 2: { + if (!(message.versionAliases && message.versionAliases.length)) + message.versionAliases = []; + message.versionAliases.push(reader.string()); + break; + } + case 3: { + message.versionDescription = reader.string(); + break; + } + case 4: { + message.vertexModelSourceInfo = $root.google.cloud.datacatalog.v1.VertexModelSourceInfo.decode(reader, reader.uint32()); + break; + } + case 5: { + message.containerImageUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VertexModelSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.VertexModelSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.VertexModelSpec} VertexModelSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VertexModelSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VertexModelSpec message. + * @function verify + * @memberof google.cloud.datacatalog.v1.VertexModelSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VertexModelSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.versionId != null && message.hasOwnProperty("versionId")) + if (!$util.isString(message.versionId)) + return "versionId: string expected"; + if (message.versionAliases != null && message.hasOwnProperty("versionAliases")) { + if (!Array.isArray(message.versionAliases)) + return "versionAliases: array expected"; + for (var i = 0; i < message.versionAliases.length; ++i) + if (!$util.isString(message.versionAliases[i])) + return "versionAliases: string[] expected"; + } + if (message.versionDescription != null && message.hasOwnProperty("versionDescription")) + if (!$util.isString(message.versionDescription)) + return "versionDescription: string expected"; + if (message.vertexModelSourceInfo != null && message.hasOwnProperty("vertexModelSourceInfo")) { + var error = $root.google.cloud.datacatalog.v1.VertexModelSourceInfo.verify(message.vertexModelSourceInfo); + if (error) + return "vertexModelSourceInfo." + error; + } + if (message.containerImageUri != null && message.hasOwnProperty("containerImageUri")) + if (!$util.isString(message.containerImageUri)) + return "containerImageUri: string expected"; + return null; + }; + + /** + * Creates a VertexModelSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.VertexModelSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.VertexModelSpec} VertexModelSpec + */ + VertexModelSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.VertexModelSpec) + return object; + var message = new $root.google.cloud.datacatalog.v1.VertexModelSpec(); + if (object.versionId != null) + message.versionId = String(object.versionId); + if (object.versionAliases) { + if (!Array.isArray(object.versionAliases)) + throw TypeError(".google.cloud.datacatalog.v1.VertexModelSpec.versionAliases: array expected"); + message.versionAliases = []; + for (var i = 0; i < object.versionAliases.length; ++i) + message.versionAliases[i] = String(object.versionAliases[i]); + } + if (object.versionDescription != null) + message.versionDescription = String(object.versionDescription); + if (object.vertexModelSourceInfo != null) { + if (typeof object.vertexModelSourceInfo !== "object") + throw TypeError(".google.cloud.datacatalog.v1.VertexModelSpec.vertexModelSourceInfo: object expected"); + message.vertexModelSourceInfo = $root.google.cloud.datacatalog.v1.VertexModelSourceInfo.fromObject(object.vertexModelSourceInfo); + } + if (object.containerImageUri != null) + message.containerImageUri = String(object.containerImageUri); + return message; + }; + + /** + * Creates a plain object from a VertexModelSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.VertexModelSpec + * @static + * @param {google.cloud.datacatalog.v1.VertexModelSpec} message VertexModelSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VertexModelSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.versionAliases = []; + if (options.defaults) { + object.versionId = ""; + object.versionDescription = ""; + object.vertexModelSourceInfo = null; + object.containerImageUri = ""; + } + if (message.versionId != null && message.hasOwnProperty("versionId")) + object.versionId = message.versionId; + if (message.versionAliases && message.versionAliases.length) { + object.versionAliases = []; + for (var j = 0; j < message.versionAliases.length; ++j) + object.versionAliases[j] = message.versionAliases[j]; + } + if (message.versionDescription != null && message.hasOwnProperty("versionDescription")) + object.versionDescription = message.versionDescription; + if (message.vertexModelSourceInfo != null && message.hasOwnProperty("vertexModelSourceInfo")) + object.vertexModelSourceInfo = $root.google.cloud.datacatalog.v1.VertexModelSourceInfo.toObject(message.vertexModelSourceInfo, options); + if (message.containerImageUri != null && message.hasOwnProperty("containerImageUri")) + object.containerImageUri = message.containerImageUri; + return object; + }; + + /** + * Converts this VertexModelSpec to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.VertexModelSpec + * @instance + * @returns {Object.} JSON object + */ + VertexModelSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VertexModelSpec + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.VertexModelSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VertexModelSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.VertexModelSpec"; + }; + + return VertexModelSpec; + })(); + + v1.VertexDatasetSpec = (function() { + + /** + * Properties of a VertexDatasetSpec. + * @memberof google.cloud.datacatalog.v1 + * @interface IVertexDatasetSpec + * @property {number|Long|null} [dataItemCount] VertexDatasetSpec dataItemCount + * @property {google.cloud.datacatalog.v1.VertexDatasetSpec.DataType|null} [dataType] VertexDatasetSpec dataType + */ + + /** + * Constructs a new VertexDatasetSpec. + * @memberof google.cloud.datacatalog.v1 + * @classdesc Represents a VertexDatasetSpec. + * @implements IVertexDatasetSpec + * @constructor + * @param {google.cloud.datacatalog.v1.IVertexDatasetSpec=} [properties] Properties to set + */ + function VertexDatasetSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VertexDatasetSpec dataItemCount. + * @member {number|Long} dataItemCount + * @memberof google.cloud.datacatalog.v1.VertexDatasetSpec + * @instance + */ + VertexDatasetSpec.prototype.dataItemCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * VertexDatasetSpec dataType. + * @member {google.cloud.datacatalog.v1.VertexDatasetSpec.DataType} dataType + * @memberof google.cloud.datacatalog.v1.VertexDatasetSpec + * @instance + */ + VertexDatasetSpec.prototype.dataType = 0; + + /** + * Creates a new VertexDatasetSpec instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.VertexDatasetSpec + * @static + * @param {google.cloud.datacatalog.v1.IVertexDatasetSpec=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.VertexDatasetSpec} VertexDatasetSpec instance + */ + VertexDatasetSpec.create = function create(properties) { + return new VertexDatasetSpec(properties); + }; + + /** + * Encodes the specified VertexDatasetSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.VertexDatasetSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.VertexDatasetSpec + * @static + * @param {google.cloud.datacatalog.v1.IVertexDatasetSpec} message VertexDatasetSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VertexDatasetSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataItemCount != null && Object.hasOwnProperty.call(message, "dataItemCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.dataItemCount); + if (message.dataType != null && Object.hasOwnProperty.call(message, "dataType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dataType); + return writer; + }; + + /** + * Encodes the specified VertexDatasetSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.VertexDatasetSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.VertexDatasetSpec + * @static + * @param {google.cloud.datacatalog.v1.IVertexDatasetSpec} message VertexDatasetSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VertexDatasetSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VertexDatasetSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.VertexDatasetSpec + * @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.VertexDatasetSpec} VertexDatasetSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VertexDatasetSpec.decode = function decode(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.VertexDatasetSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataItemCount = reader.int64(); + break; + } + case 2: { + message.dataType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VertexDatasetSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.VertexDatasetSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.VertexDatasetSpec} VertexDatasetSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VertexDatasetSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VertexDatasetSpec message. + * @function verify + * @memberof google.cloud.datacatalog.v1.VertexDatasetSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VertexDatasetSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataItemCount != null && message.hasOwnProperty("dataItemCount")) + if (!$util.isInteger(message.dataItemCount) && !(message.dataItemCount && $util.isInteger(message.dataItemCount.low) && $util.isInteger(message.dataItemCount.high))) + return "dataItemCount: integer|Long expected"; + if (message.dataType != null && message.hasOwnProperty("dataType")) + switch (message.dataType) { + default: + return "dataType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + return null; + }; + + /** + * Creates a VertexDatasetSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.VertexDatasetSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.VertexDatasetSpec} VertexDatasetSpec + */ + VertexDatasetSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.VertexDatasetSpec) + return object; + var message = new $root.google.cloud.datacatalog.v1.VertexDatasetSpec(); + if (object.dataItemCount != null) + if ($util.Long) + (message.dataItemCount = $util.Long.fromValue(object.dataItemCount)).unsigned = false; + else if (typeof object.dataItemCount === "string") + message.dataItemCount = parseInt(object.dataItemCount, 10); + else if (typeof object.dataItemCount === "number") + message.dataItemCount = object.dataItemCount; + else if (typeof object.dataItemCount === "object") + message.dataItemCount = new $util.LongBits(object.dataItemCount.low >>> 0, object.dataItemCount.high >>> 0).toNumber(); + switch (object.dataType) { + default: + if (typeof object.dataType === "number") { + message.dataType = object.dataType; + break; + } + break; + case "DATA_TYPE_UNSPECIFIED": + case 0: + message.dataType = 0; + break; + case "TABLE": + case 1: + message.dataType = 1; + break; + case "IMAGE": + case 2: + message.dataType = 2; + break; + case "TEXT": + case 3: + message.dataType = 3; + break; + case "VIDEO": + case 4: + message.dataType = 4; + break; + case "CONVERSATION": + case 5: + message.dataType = 5; + break; + case "TIME_SERIES": + case 6: + message.dataType = 6; + break; + case "DOCUMENT": + case 7: + message.dataType = 7; + break; + case "TEXT_TO_SPEECH": + case 8: + message.dataType = 8; + break; + case "TRANSLATION": + case 9: + message.dataType = 9; + break; + case "STORE_VISION": + case 10: + message.dataType = 10; + break; + case "ENTERPRISE_KNOWLEDGE_GRAPH": + case 11: + message.dataType = 11; + break; + case "TEXT_PROMPT": + case 12: + message.dataType = 12; + break; + } + return message; + }; + + /** + * Creates a plain object from a VertexDatasetSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.VertexDatasetSpec + * @static + * @param {google.cloud.datacatalog.v1.VertexDatasetSpec} message VertexDatasetSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VertexDatasetSpec.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.dataItemCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.dataItemCount = options.longs === String ? "0" : 0; + object.dataType = options.enums === String ? "DATA_TYPE_UNSPECIFIED" : 0; + } + if (message.dataItemCount != null && message.hasOwnProperty("dataItemCount")) + if (typeof message.dataItemCount === "number") + object.dataItemCount = options.longs === String ? String(message.dataItemCount) : message.dataItemCount; + else + object.dataItemCount = options.longs === String ? $util.Long.prototype.toString.call(message.dataItemCount) : options.longs === Number ? new $util.LongBits(message.dataItemCount.low >>> 0, message.dataItemCount.high >>> 0).toNumber() : message.dataItemCount; + if (message.dataType != null && message.hasOwnProperty("dataType")) + object.dataType = options.enums === String ? $root.google.cloud.datacatalog.v1.VertexDatasetSpec.DataType[message.dataType] === undefined ? message.dataType : $root.google.cloud.datacatalog.v1.VertexDatasetSpec.DataType[message.dataType] : message.dataType; + return object; + }; + + /** + * Converts this VertexDatasetSpec to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.VertexDatasetSpec + * @instance + * @returns {Object.} JSON object + */ + VertexDatasetSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VertexDatasetSpec + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.VertexDatasetSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VertexDatasetSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.VertexDatasetSpec"; + }; + + /** + * DataType enum. + * @name google.cloud.datacatalog.v1.VertexDatasetSpec.DataType + * @enum {number} + * @property {number} DATA_TYPE_UNSPECIFIED=0 DATA_TYPE_UNSPECIFIED value + * @property {number} TABLE=1 TABLE value + * @property {number} IMAGE=2 IMAGE value + * @property {number} TEXT=3 TEXT value + * @property {number} VIDEO=4 VIDEO value + * @property {number} CONVERSATION=5 CONVERSATION value + * @property {number} TIME_SERIES=6 TIME_SERIES value + * @property {number} DOCUMENT=7 DOCUMENT value + * @property {number} TEXT_TO_SPEECH=8 TEXT_TO_SPEECH value + * @property {number} TRANSLATION=9 TRANSLATION value + * @property {number} STORE_VISION=10 STORE_VISION value + * @property {number} ENTERPRISE_KNOWLEDGE_GRAPH=11 ENTERPRISE_KNOWLEDGE_GRAPH value + * @property {number} TEXT_PROMPT=12 TEXT_PROMPT value + */ + VertexDatasetSpec.DataType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLE"] = 1; + values[valuesById[2] = "IMAGE"] = 2; + values[valuesById[3] = "TEXT"] = 3; + values[valuesById[4] = "VIDEO"] = 4; + values[valuesById[5] = "CONVERSATION"] = 5; + values[valuesById[6] = "TIME_SERIES"] = 6; + values[valuesById[7] = "DOCUMENT"] = 7; + values[valuesById[8] = "TEXT_TO_SPEECH"] = 8; + values[valuesById[9] = "TRANSLATION"] = 9; + values[valuesById[10] = "STORE_VISION"] = 10; + values[valuesById[11] = "ENTERPRISE_KNOWLEDGE_GRAPH"] = 11; + values[valuesById[12] = "TEXT_PROMPT"] = 12; + return values; + })(); + + return VertexDatasetSpec; + })(); + + v1.ModelSpec = (function() { + + /** + * Properties of a ModelSpec. + * @memberof google.cloud.datacatalog.v1 + * @interface IModelSpec + * @property {google.cloud.datacatalog.v1.IVertexModelSpec|null} [vertexModelSpec] ModelSpec vertexModelSpec + */ + + /** + * Constructs a new ModelSpec. + * @memberof google.cloud.datacatalog.v1 + * @classdesc Represents a ModelSpec. + * @implements IModelSpec + * @constructor + * @param {google.cloud.datacatalog.v1.IModelSpec=} [properties] Properties to set + */ + function ModelSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ModelSpec vertexModelSpec. + * @member {google.cloud.datacatalog.v1.IVertexModelSpec|null|undefined} vertexModelSpec + * @memberof google.cloud.datacatalog.v1.ModelSpec + * @instance + */ + ModelSpec.prototype.vertexModelSpec = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ModelSpec systemSpec. + * @member {"vertexModelSpec"|undefined} systemSpec + * @memberof google.cloud.datacatalog.v1.ModelSpec + * @instance + */ + Object.defineProperty(ModelSpec.prototype, "systemSpec", { + get: $util.oneOfGetter($oneOfFields = ["vertexModelSpec"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ModelSpec instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.ModelSpec + * @static + * @param {google.cloud.datacatalog.v1.IModelSpec=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.ModelSpec} ModelSpec instance + */ + ModelSpec.create = function create(properties) { + return new ModelSpec(properties); + }; + + /** + * Encodes the specified ModelSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.ModelSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.ModelSpec + * @static + * @param {google.cloud.datacatalog.v1.IModelSpec} message ModelSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModelSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.vertexModelSpec != null && Object.hasOwnProperty.call(message, "vertexModelSpec")) + $root.google.cloud.datacatalog.v1.VertexModelSpec.encode(message.vertexModelSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ModelSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ModelSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.ModelSpec + * @static + * @param {google.cloud.datacatalog.v1.IModelSpec} message ModelSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModelSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ModelSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.ModelSpec + * @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.ModelSpec} ModelSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModelSpec.decode = function decode(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.ModelSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.vertexModelSpec = $root.google.cloud.datacatalog.v1.VertexModelSpec.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ModelSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.ModelSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.ModelSpec} ModelSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModelSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ModelSpec message. + * @function verify + * @memberof google.cloud.datacatalog.v1.ModelSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ModelSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.vertexModelSpec != null && message.hasOwnProperty("vertexModelSpec")) { + properties.systemSpec = 1; + { + var error = $root.google.cloud.datacatalog.v1.VertexModelSpec.verify(message.vertexModelSpec); + if (error) + return "vertexModelSpec." + error; + } + } + return null; + }; + + /** + * Creates a ModelSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.ModelSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.ModelSpec} ModelSpec + */ + ModelSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.ModelSpec) + return object; + var message = new $root.google.cloud.datacatalog.v1.ModelSpec(); + if (object.vertexModelSpec != null) { + if (typeof object.vertexModelSpec !== "object") + throw TypeError(".google.cloud.datacatalog.v1.ModelSpec.vertexModelSpec: object expected"); + message.vertexModelSpec = $root.google.cloud.datacatalog.v1.VertexModelSpec.fromObject(object.vertexModelSpec); + } + return message; + }; + + /** + * Creates a plain object from a ModelSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.ModelSpec + * @static + * @param {google.cloud.datacatalog.v1.ModelSpec} message ModelSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ModelSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.vertexModelSpec != null && message.hasOwnProperty("vertexModelSpec")) { + object.vertexModelSpec = $root.google.cloud.datacatalog.v1.VertexModelSpec.toObject(message.vertexModelSpec, options); + if (options.oneofs) + object.systemSpec = "vertexModelSpec"; + } + return object; + }; + + /** + * Converts this ModelSpec to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.ModelSpec + * @instance + * @returns {Object.} JSON object + */ + ModelSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ModelSpec + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.ModelSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ModelSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.ModelSpec"; + }; + + return ModelSpec; + })(); + + v1.FeatureOnlineStoreSpec = (function() { + + /** + * Properties of a FeatureOnlineStoreSpec. + * @memberof google.cloud.datacatalog.v1 + * @interface IFeatureOnlineStoreSpec + * @property {google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.StorageType|null} [storageType] FeatureOnlineStoreSpec storageType + */ + + /** + * Constructs a new FeatureOnlineStoreSpec. + * @memberof google.cloud.datacatalog.v1 + * @classdesc Represents a FeatureOnlineStoreSpec. + * @implements IFeatureOnlineStoreSpec + * @constructor + * @param {google.cloud.datacatalog.v1.IFeatureOnlineStoreSpec=} [properties] Properties to set + */ + function FeatureOnlineStoreSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureOnlineStoreSpec storageType. + * @member {google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.StorageType} storageType + * @memberof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec + * @instance + */ + FeatureOnlineStoreSpec.prototype.storageType = 0; + + /** + * Creates a new FeatureOnlineStoreSpec instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec + * @static + * @param {google.cloud.datacatalog.v1.IFeatureOnlineStoreSpec=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.FeatureOnlineStoreSpec} FeatureOnlineStoreSpec instance + */ + FeatureOnlineStoreSpec.create = function create(properties) { + return new FeatureOnlineStoreSpec(properties); + }; + + /** + * Encodes the specified FeatureOnlineStoreSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec + * @static + * @param {google.cloud.datacatalog.v1.IFeatureOnlineStoreSpec} message FeatureOnlineStoreSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureOnlineStoreSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.storageType != null && Object.hasOwnProperty.call(message, "storageType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.storageType); + return writer; + }; + + /** + * Encodes the specified FeatureOnlineStoreSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec + * @static + * @param {google.cloud.datacatalog.v1.IFeatureOnlineStoreSpec} message FeatureOnlineStoreSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureOnlineStoreSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureOnlineStoreSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec + * @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.FeatureOnlineStoreSpec} FeatureOnlineStoreSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureOnlineStoreSpec.decode = function decode(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.FeatureOnlineStoreSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.storageType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureOnlineStoreSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.FeatureOnlineStoreSpec} FeatureOnlineStoreSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureOnlineStoreSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureOnlineStoreSpec message. + * @function verify + * @memberof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureOnlineStoreSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.storageType != null && message.hasOwnProperty("storageType")) + switch (message.storageType) { + default: + return "storageType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a FeatureOnlineStoreSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.FeatureOnlineStoreSpec} FeatureOnlineStoreSpec + */ + FeatureOnlineStoreSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.FeatureOnlineStoreSpec) + return object; + var message = new $root.google.cloud.datacatalog.v1.FeatureOnlineStoreSpec(); + switch (object.storageType) { + default: + if (typeof object.storageType === "number") { + message.storageType = object.storageType; + break; + } + break; + case "STORAGE_TYPE_UNSPECIFIED": + case 0: + message.storageType = 0; + break; + case "BIGTABLE": + case 1: + message.storageType = 1; + break; + case "OPTIMIZED": + case 2: + message.storageType = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureOnlineStoreSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec + * @static + * @param {google.cloud.datacatalog.v1.FeatureOnlineStoreSpec} message FeatureOnlineStoreSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureOnlineStoreSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.storageType = options.enums === String ? "STORAGE_TYPE_UNSPECIFIED" : 0; + if (message.storageType != null && message.hasOwnProperty("storageType")) + object.storageType = options.enums === String ? $root.google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.StorageType[message.storageType] === undefined ? message.storageType : $root.google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.StorageType[message.storageType] : message.storageType; + return object; + }; + + /** + * Converts this FeatureOnlineStoreSpec to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec + * @instance + * @returns {Object.} JSON object + */ + FeatureOnlineStoreSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureOnlineStoreSpec + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureOnlineStoreSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.FeatureOnlineStoreSpec"; + }; + + /** + * StorageType enum. + * @name google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.StorageType + * @enum {number} + * @property {number} STORAGE_TYPE_UNSPECIFIED=0 STORAGE_TYPE_UNSPECIFIED value + * @property {number} BIGTABLE=1 BIGTABLE value + * @property {number} OPTIMIZED=2 OPTIMIZED value + */ + FeatureOnlineStoreSpec.StorageType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STORAGE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BIGTABLE"] = 1; + values[valuesById[2] = "OPTIMIZED"] = 2; + return values; + })(); + + return FeatureOnlineStoreSpec; + })(); + + 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 + * @property {boolean|null} [transferredToDataplex] EntryGroup transferredToDataplex + */ + + /** + * 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; + + /** + * EntryGroup transferredToDataplex. + * @member {boolean} transferredToDataplex + * @memberof google.cloud.datacatalog.v1.EntryGroup + * @instance + */ + EntryGroup.prototype.transferredToDataplex = false; + + /** + * 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(); + if (message.transferredToDataplex != null && Object.hasOwnProperty.call(message, "transferredToDataplex")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.transferredToDataplex); + 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; + } + case 9: { + message.transferredToDataplex = reader.bool(); + 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; + } + if (message.transferredToDataplex != null && message.hasOwnProperty("transferredToDataplex")) + if (typeof message.transferredToDataplex !== "boolean") + return "transferredToDataplex: boolean expected"; + 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); + } + if (object.transferredToDataplex != null) + message.transferredToDataplex = Boolean(object.transferredToDataplex); + 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; + object.transferredToDataplex = false; + } + 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); + if (message.transferredToDataplex != null && message.hasOwnProperty("transferredToDataplex")) + object.transferredToDataplex = message.transferredToDataplex; + 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.ReconcileTagsRequest = (function() { + + /** + * Properties of a ReconcileTagsRequest. + * @memberof google.cloud.datacatalog.v1 + * @interface IReconcileTagsRequest + * @property {string|null} [parent] ReconcileTagsRequest parent + * @property {string|null} [tagTemplate] ReconcileTagsRequest tagTemplate + * @property {boolean|null} [forceDeleteMissing] ReconcileTagsRequest forceDeleteMissing + * @property {Array.|null} [tags] ReconcileTagsRequest tags + */ + + /** + * Constructs a new ReconcileTagsRequest. + * @memberof google.cloud.datacatalog.v1 + * @classdesc Represents a ReconcileTagsRequest. + * @implements IReconcileTagsRequest + * @constructor + * @param {google.cloud.datacatalog.v1.IReconcileTagsRequest=} [properties] Properties to set + */ + function ReconcileTagsRequest(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]]; + } + + /** + * ReconcileTagsRequest parent. + * @member {string} parent + * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest + * @instance + */ + ReconcileTagsRequest.prototype.parent = ""; + + /** + * ReconcileTagsRequest tagTemplate. + * @member {string} tagTemplate + * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest + * @instance + */ + ReconcileTagsRequest.prototype.tagTemplate = ""; + + /** + * ReconcileTagsRequest forceDeleteMissing. + * @member {boolean} forceDeleteMissing + * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest + * @instance + */ + ReconcileTagsRequest.prototype.forceDeleteMissing = false; + + /** + * ReconcileTagsRequest tags. + * @member {Array.} tags + * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest + * @instance + */ + ReconcileTagsRequest.prototype.tags = $util.emptyArray; + + /** + * Creates a new ReconcileTagsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest + * @static + * @param {google.cloud.datacatalog.v1.IReconcileTagsRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.ReconcileTagsRequest} ReconcileTagsRequest instance + */ + ReconcileTagsRequest.create = function create(properties) { + return new ReconcileTagsRequest(properties); + }; + + /** + * Encodes the specified ReconcileTagsRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ReconcileTagsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest + * @static + * @param {google.cloud.datacatalog.v1.IReconcileTagsRequest} message ReconcileTagsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReconcileTagsRequest.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")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tagTemplate); + if (message.forceDeleteMissing != null && Object.hasOwnProperty.call(message, "forceDeleteMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.forceDeleteMissing); + 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 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReconcileTagsRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ReconcileTagsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest + * @static + * @param {google.cloud.datacatalog.v1.IReconcileTagsRequest} message ReconcileTagsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReconcileTagsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReconcileTagsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest + * @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.ReconcileTagsRequest} ReconcileTagsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReconcileTagsRequest.decode = function decode(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.ReconcileTagsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.tagTemplate = reader.string(); + break; + } + case 3: { + message.forceDeleteMissing = reader.bool(); + break; + } + case 4: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push($root.google.cloud.datacatalog.v1.Tag.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReconcileTagsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.ReconcileTagsRequest} ReconcileTagsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReconcileTagsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReconcileTagsRequest message. + * @function verify + * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReconcileTagsRequest.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.tagTemplate != null && message.hasOwnProperty("tagTemplate")) + if (!$util.isString(message.tagTemplate)) + return "tagTemplate: string expected"; + if (message.forceDeleteMissing != null && message.hasOwnProperty("forceDeleteMissing")) + if (typeof message.forceDeleteMissing !== "boolean") + return "forceDeleteMissing: boolean 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; + } + } + return null; + }; + + /** + * Creates a ReconcileTagsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.ReconcileTagsRequest} ReconcileTagsRequest + */ + ReconcileTagsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.ReconcileTagsRequest) + return object; + var message = new $root.google.cloud.datacatalog.v1.ReconcileTagsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.tagTemplate != null) + message.tagTemplate = String(object.tagTemplate); + if (object.forceDeleteMissing != null) + message.forceDeleteMissing = Boolean(object.forceDeleteMissing); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.datacatalog.v1.ReconcileTagsRequest.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.ReconcileTagsRequest.tags: object expected"); + message.tags[i] = $root.google.cloud.datacatalog.v1.Tag.fromObject(object.tags[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ReconcileTagsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest + * @static + * @param {google.cloud.datacatalog.v1.ReconcileTagsRequest} message ReconcileTagsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReconcileTagsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tags = []; + if (options.defaults) { + object.parent = ""; + object.tagTemplate = ""; + object.forceDeleteMissing = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.tagTemplate != null && message.hasOwnProperty("tagTemplate")) + object.tagTemplate = message.tagTemplate; + if (message.forceDeleteMissing != null && message.hasOwnProperty("forceDeleteMissing")) + object.forceDeleteMissing = message.forceDeleteMissing; + 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); + } + return object; + }; + + /** + * Converts this ReconcileTagsRequest to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest + * @instance + * @returns {Object.} JSON object + */ + ReconcileTagsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReconcileTagsRequest + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReconcileTagsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.ReconcileTagsRequest"; + }; + + return ReconcileTagsRequest; + })(); + + v1.ReconcileTagsResponse = (function() { + + /** + * Properties of a ReconcileTagsResponse. + * @memberof google.cloud.datacatalog.v1 + * @interface IReconcileTagsResponse + * @property {number|Long|null} [createdTagsCount] ReconcileTagsResponse createdTagsCount + * @property {number|Long|null} [updatedTagsCount] ReconcileTagsResponse updatedTagsCount + * @property {number|Long|null} [deletedTagsCount] ReconcileTagsResponse deletedTagsCount + */ + + /** + * Constructs a new ReconcileTagsResponse. + * @memberof google.cloud.datacatalog.v1 + * @classdesc Represents a ReconcileTagsResponse. + * @implements IReconcileTagsResponse + * @constructor + * @param {google.cloud.datacatalog.v1.IReconcileTagsResponse=} [properties] Properties to set + */ + function ReconcileTagsResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReconcileTagsResponse createdTagsCount. + * @member {number|Long} createdTagsCount + * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse + * @instance + */ + ReconcileTagsResponse.prototype.createdTagsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ReconcileTagsResponse updatedTagsCount. + * @member {number|Long} updatedTagsCount + * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse + * @instance + */ + ReconcileTagsResponse.prototype.updatedTagsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ReconcileTagsResponse deletedTagsCount. + * @member {number|Long} deletedTagsCount + * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse + * @instance + */ + ReconcileTagsResponse.prototype.deletedTagsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ReconcileTagsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse + * @static + * @param {google.cloud.datacatalog.v1.IReconcileTagsResponse=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.ReconcileTagsResponse} ReconcileTagsResponse instance + */ + ReconcileTagsResponse.create = function create(properties) { + return new ReconcileTagsResponse(properties); + }; + + /** + * Encodes the specified ReconcileTagsResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.ReconcileTagsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse + * @static + * @param {google.cloud.datacatalog.v1.IReconcileTagsResponse} message ReconcileTagsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReconcileTagsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createdTagsCount != null && Object.hasOwnProperty.call(message, "createdTagsCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.createdTagsCount); + if (message.updatedTagsCount != null && Object.hasOwnProperty.call(message, "updatedTagsCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.updatedTagsCount); + if (message.deletedTagsCount != null && Object.hasOwnProperty.call(message, "deletedTagsCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.deletedTagsCount); + return writer; + }; + + /** + * Encodes the specified ReconcileTagsResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ReconcileTagsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse + * @static + * @param {google.cloud.datacatalog.v1.IReconcileTagsResponse} message ReconcileTagsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReconcileTagsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReconcileTagsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse + * @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.ReconcileTagsResponse} ReconcileTagsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReconcileTagsResponse.decode = function decode(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.ReconcileTagsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createdTagsCount = reader.int64(); + break; + } + case 2: { + message.updatedTagsCount = reader.int64(); + break; + } + case 3: { + message.deletedTagsCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReconcileTagsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.ReconcileTagsResponse} ReconcileTagsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReconcileTagsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReconcileTagsResponse message. + * @function verify + * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReconcileTagsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.createdTagsCount != null && message.hasOwnProperty("createdTagsCount")) + if (!$util.isInteger(message.createdTagsCount) && !(message.createdTagsCount && $util.isInteger(message.createdTagsCount.low) && $util.isInteger(message.createdTagsCount.high))) + return "createdTagsCount: integer|Long expected"; + if (message.updatedTagsCount != null && message.hasOwnProperty("updatedTagsCount")) + if (!$util.isInteger(message.updatedTagsCount) && !(message.updatedTagsCount && $util.isInteger(message.updatedTagsCount.low) && $util.isInteger(message.updatedTagsCount.high))) + return "updatedTagsCount: integer|Long expected"; + if (message.deletedTagsCount != null && message.hasOwnProperty("deletedTagsCount")) + if (!$util.isInteger(message.deletedTagsCount) && !(message.deletedTagsCount && $util.isInteger(message.deletedTagsCount.low) && $util.isInteger(message.deletedTagsCount.high))) + return "deletedTagsCount: integer|Long expected"; + return null; + }; + + /** + * Creates a ReconcileTagsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.ReconcileTagsResponse} ReconcileTagsResponse + */ + ReconcileTagsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.ReconcileTagsResponse) + return object; + var message = new $root.google.cloud.datacatalog.v1.ReconcileTagsResponse(); + if (object.createdTagsCount != null) + if ($util.Long) + (message.createdTagsCount = $util.Long.fromValue(object.createdTagsCount)).unsigned = false; + else if (typeof object.createdTagsCount === "string") + message.createdTagsCount = parseInt(object.createdTagsCount, 10); + else if (typeof object.createdTagsCount === "number") + message.createdTagsCount = object.createdTagsCount; + else if (typeof object.createdTagsCount === "object") + message.createdTagsCount = new $util.LongBits(object.createdTagsCount.low >>> 0, object.createdTagsCount.high >>> 0).toNumber(); + if (object.updatedTagsCount != null) + if ($util.Long) + (message.updatedTagsCount = $util.Long.fromValue(object.updatedTagsCount)).unsigned = false; + else if (typeof object.updatedTagsCount === "string") + message.updatedTagsCount = parseInt(object.updatedTagsCount, 10); + else if (typeof object.updatedTagsCount === "number") + message.updatedTagsCount = object.updatedTagsCount; + else if (typeof object.updatedTagsCount === "object") + message.updatedTagsCount = new $util.LongBits(object.updatedTagsCount.low >>> 0, object.updatedTagsCount.high >>> 0).toNumber(); + if (object.deletedTagsCount != null) + if ($util.Long) + (message.deletedTagsCount = $util.Long.fromValue(object.deletedTagsCount)).unsigned = false; + else if (typeof object.deletedTagsCount === "string") + message.deletedTagsCount = parseInt(object.deletedTagsCount, 10); + else if (typeof object.deletedTagsCount === "number") + message.deletedTagsCount = object.deletedTagsCount; + else if (typeof object.deletedTagsCount === "object") + message.deletedTagsCount = new $util.LongBits(object.deletedTagsCount.low >>> 0, object.deletedTagsCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ReconcileTagsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse + * @static + * @param {google.cloud.datacatalog.v1.ReconcileTagsResponse} message ReconcileTagsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReconcileTagsResponse.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.createdTagsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.createdTagsCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.updatedTagsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.updatedTagsCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.deletedTagsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.deletedTagsCount = options.longs === String ? "0" : 0; + } + if (message.createdTagsCount != null && message.hasOwnProperty("createdTagsCount")) + if (typeof message.createdTagsCount === "number") + object.createdTagsCount = options.longs === String ? String(message.createdTagsCount) : message.createdTagsCount; + else + object.createdTagsCount = options.longs === String ? $util.Long.prototype.toString.call(message.createdTagsCount) : options.longs === Number ? new $util.LongBits(message.createdTagsCount.low >>> 0, message.createdTagsCount.high >>> 0).toNumber() : message.createdTagsCount; + if (message.updatedTagsCount != null && message.hasOwnProperty("updatedTagsCount")) + if (typeof message.updatedTagsCount === "number") + object.updatedTagsCount = options.longs === String ? String(message.updatedTagsCount) : message.updatedTagsCount; + else + object.updatedTagsCount = options.longs === String ? $util.Long.prototype.toString.call(message.updatedTagsCount) : options.longs === Number ? new $util.LongBits(message.updatedTagsCount.low >>> 0, message.updatedTagsCount.high >>> 0).toNumber() : message.updatedTagsCount; + if (message.deletedTagsCount != null && message.hasOwnProperty("deletedTagsCount")) + if (typeof message.deletedTagsCount === "number") + object.deletedTagsCount = options.longs === String ? String(message.deletedTagsCount) : message.deletedTagsCount; + else + object.deletedTagsCount = options.longs === String ? $util.Long.prototype.toString.call(message.deletedTagsCount) : options.longs === Number ? new $util.LongBits(message.deletedTagsCount.low >>> 0, message.deletedTagsCount.high >>> 0).toNumber() : message.deletedTagsCount; + return object; + }; + + /** + * Converts this ReconcileTagsResponse to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse + * @instance + * @returns {Object.} JSON object + */ + ReconcileTagsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReconcileTagsResponse + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReconcileTagsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.ReconcileTagsResponse"; + }; + + return ReconcileTagsResponse; + })(); + + v1.ReconcileTagsMetadata = (function() { + + /** + * Properties of a ReconcileTagsMetadata. + * @memberof google.cloud.datacatalog.v1 + * @interface IReconcileTagsMetadata + * @property {google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState|null} [state] ReconcileTagsMetadata state + * @property {Object.|null} [errors] ReconcileTagsMetadata errors + */ + + /** + * Constructs a new ReconcileTagsMetadata. + * @memberof google.cloud.datacatalog.v1 + * @classdesc Represents a ReconcileTagsMetadata. + * @implements IReconcileTagsMetadata + * @constructor + * @param {google.cloud.datacatalog.v1.IReconcileTagsMetadata=} [properties] Properties to set + */ + function ReconcileTagsMetadata(properties) { + this.errors = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReconcileTagsMetadata state. + * @member {google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState} state + * @memberof google.cloud.datacatalog.v1.ReconcileTagsMetadata + * @instance + */ + ReconcileTagsMetadata.prototype.state = 0; + + /** + * ReconcileTagsMetadata errors. + * @member {Object.} errors + * @memberof google.cloud.datacatalog.v1.ReconcileTagsMetadata + * @instance + */ + ReconcileTagsMetadata.prototype.errors = $util.emptyObject; + + /** + * Creates a new ReconcileTagsMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.ReconcileTagsMetadata + * @static + * @param {google.cloud.datacatalog.v1.IReconcileTagsMetadata=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.ReconcileTagsMetadata} ReconcileTagsMetadata instance + */ + ReconcileTagsMetadata.create = function create(properties) { + return new ReconcileTagsMetadata(properties); + }; + + /** + * Encodes the specified ReconcileTagsMetadata message. Does not implicitly {@link google.cloud.datacatalog.v1.ReconcileTagsMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.ReconcileTagsMetadata + * @static + * @param {google.cloud.datacatalog.v1.IReconcileTagsMetadata} message ReconcileTagsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReconcileTagsMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.errors != null && Object.hasOwnProperty.call(message, "errors")) + for (var keys = Object.keys(message.errors), 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.rpc.Status.encode(message.errors[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ReconcileTagsMetadata message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ReconcileTagsMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.ReconcileTagsMetadata + * @static + * @param {google.cloud.datacatalog.v1.IReconcileTagsMetadata} message ReconcileTagsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReconcileTagsMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReconcileTagsMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.ReconcileTagsMetadata + * @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.ReconcileTagsMetadata} ReconcileTagsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReconcileTagsMetadata.decode = function decode(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.ReconcileTagsMetadata(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + if (message.errors === $util.emptyObject) + message.errors = {}; + 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.rpc.Status.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.errors[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReconcileTagsMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.ReconcileTagsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.ReconcileTagsMetadata} ReconcileTagsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReconcileTagsMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReconcileTagsMetadata message. + * @function verify + * @memberof google.cloud.datacatalog.v1.ReconcileTagsMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReconcileTagsMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!$util.isObject(message.errors)) + return "errors: object expected"; + var key = Object.keys(message.errors); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.rpc.Status.verify(message.errors[key[i]]); + if (error) + return "errors." + error; + } + } + return null; + }; + + /** + * Creates a ReconcileTagsMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.ReconcileTagsMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.ReconcileTagsMetadata} ReconcileTagsMetadata + */ + ReconcileTagsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.ReconcileTagsMetadata) + return object; + var message = new $root.google.cloud.datacatalog.v1.ReconcileTagsMetadata(); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "RECONCILIATION_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "RECONCILIATION_QUEUED": + case 1: + message.state = 1; + break; + case "RECONCILIATION_IN_PROGRESS": + case 2: + message.state = 2; + break; + case "RECONCILIATION_DONE": + case 3: + message.state = 3; + break; + } + if (object.errors) { + if (typeof object.errors !== "object") + throw TypeError(".google.cloud.datacatalog.v1.ReconcileTagsMetadata.errors: object expected"); + message.errors = {}; + for (var keys = Object.keys(object.errors), i = 0; i < keys.length; ++i) { + if (typeof object.errors[keys[i]] !== "object") + throw TypeError(".google.cloud.datacatalog.v1.ReconcileTagsMetadata.errors: object expected"); + message.errors[keys[i]] = $root.google.rpc.Status.fromObject(object.errors[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a ReconcileTagsMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.ReconcileTagsMetadata + * @static + * @param {google.cloud.datacatalog.v1.ReconcileTagsMetadata} message ReconcileTagsMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReconcileTagsMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.errors = {}; + if (options.defaults) + object.state = options.enums === String ? "RECONCILIATION_STATE_UNSPECIFIED" : 0; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState[message.state] === undefined ? message.state : $root.google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState[message.state] : message.state; + var keys2; + if (message.errors && (keys2 = Object.keys(message.errors)).length) { + object.errors = {}; + for (var j = 0; j < keys2.length; ++j) + object.errors[keys2[j]] = $root.google.rpc.Status.toObject(message.errors[keys2[j]], options); + } + return object; + }; + + /** + * Converts this ReconcileTagsMetadata to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.ReconcileTagsMetadata + * @instance + * @returns {Object.} JSON object + */ + ReconcileTagsMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReconcileTagsMetadata + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.ReconcileTagsMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReconcileTagsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.ReconcileTagsMetadata"; + }; + + /** + * ReconciliationState enum. + * @name google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState + * @enum {number} + * @property {number} RECONCILIATION_STATE_UNSPECIFIED=0 RECONCILIATION_STATE_UNSPECIFIED value + * @property {number} RECONCILIATION_QUEUED=1 RECONCILIATION_QUEUED value + * @property {number} RECONCILIATION_IN_PROGRESS=2 RECONCILIATION_IN_PROGRESS value + * @property {number} RECONCILIATION_DONE=3 RECONCILIATION_DONE value + */ + ReconcileTagsMetadata.ReconciliationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RECONCILIATION_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RECONCILIATION_QUEUED"] = 1; + values[valuesById[2] = "RECONCILIATION_IN_PROGRESS"] = 2; + values[valuesById[3] = "RECONCILIATION_DONE"] = 3; + return values; + })(); + + return ReconcileTagsMetadata; + })(); + + 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.ImportEntriesRequest = (function() { + + /** + * Properties of an ImportEntriesRequest. + * @memberof google.cloud.datacatalog.v1 + * @interface IImportEntriesRequest + * @property {string|null} [parent] ImportEntriesRequest parent + * @property {string|null} [gcsBucketPath] ImportEntriesRequest gcsBucketPath + * @property {string|null} [jobId] ImportEntriesRequest jobId + */ + + /** + * Constructs a new ImportEntriesRequest. + * @memberof google.cloud.datacatalog.v1 + * @classdesc Represents an ImportEntriesRequest. + * @implements IImportEntriesRequest + * @constructor + * @param {google.cloud.datacatalog.v1.IImportEntriesRequest=} [properties] Properties to set + */ + function ImportEntriesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImportEntriesRequest parent. + * @member {string} parent + * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest + * @instance + */ + ImportEntriesRequest.prototype.parent = ""; + + /** + * ImportEntriesRequest gcsBucketPath. + * @member {string|null|undefined} gcsBucketPath + * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest + * @instance + */ + ImportEntriesRequest.prototype.gcsBucketPath = null; + + /** + * ImportEntriesRequest jobId. + * @member {string} jobId + * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest + * @instance + */ + ImportEntriesRequest.prototype.jobId = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ImportEntriesRequest source. + * @member {"gcsBucketPath"|undefined} source + * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest + * @instance + */ + Object.defineProperty(ImportEntriesRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gcsBucketPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImportEntriesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest + * @static + * @param {google.cloud.datacatalog.v1.IImportEntriesRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.ImportEntriesRequest} ImportEntriesRequest instance + */ + ImportEntriesRequest.create = function create(properties) { + return new ImportEntriesRequest(properties); + }; + + /** + * Encodes the specified ImportEntriesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ImportEntriesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest + * @static + * @param {google.cloud.datacatalog.v1.IImportEntriesRequest} message ImportEntriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportEntriesRequest.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.gcsBucketPath != null && Object.hasOwnProperty.call(message, "gcsBucketPath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gcsBucketPath); + if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.jobId); + return writer; + }; + + /** + * Encodes the specified ImportEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ImportEntriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest + * @static + * @param {google.cloud.datacatalog.v1.IImportEntriesRequest} message ImportEntriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportEntriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest + * @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.ImportEntriesRequest} ImportEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportEntriesRequest.decode = function decode(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.ImportEntriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.gcsBucketPath = reader.string(); + break; + } + case 3: { + message.jobId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportEntriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.ImportEntriesRequest} ImportEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportEntriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportEntriesRequest message. + * @function verify + * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportEntriesRequest.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.gcsBucketPath != null && message.hasOwnProperty("gcsBucketPath")) { + properties.source = 1; + if (!$util.isString(message.gcsBucketPath)) + return "gcsBucketPath: string expected"; + } + if (message.jobId != null && message.hasOwnProperty("jobId")) + if (!$util.isString(message.jobId)) + return "jobId: string expected"; + return null; + }; + + /** + * Creates an ImportEntriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.ImportEntriesRequest} ImportEntriesRequest + */ + ImportEntriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.ImportEntriesRequest) + return object; + var message = new $root.google.cloud.datacatalog.v1.ImportEntriesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.gcsBucketPath != null) + message.gcsBucketPath = String(object.gcsBucketPath); + if (object.jobId != null) + message.jobId = String(object.jobId); + return message; + }; + + /** + * Creates a plain object from an ImportEntriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest + * @static + * @param {google.cloud.datacatalog.v1.ImportEntriesRequest} message ImportEntriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportEntriesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.jobId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.gcsBucketPath != null && message.hasOwnProperty("gcsBucketPath")) { + object.gcsBucketPath = message.gcsBucketPath; + if (options.oneofs) + object.source = "gcsBucketPath"; + } + if (message.jobId != null && message.hasOwnProperty("jobId")) + object.jobId = message.jobId; + return object; + }; + + /** + * Converts this ImportEntriesRequest to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest + * @instance + * @returns {Object.} JSON object + */ + ImportEntriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportEntriesRequest + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportEntriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.ImportEntriesRequest"; + }; + + return ImportEntriesRequest; + })(); + + v1.ImportEntriesResponse = (function() { + + /** + * Properties of an ImportEntriesResponse. + * @memberof google.cloud.datacatalog.v1 + * @interface IImportEntriesResponse + * @property {number|Long|null} [upsertedEntriesCount] ImportEntriesResponse upsertedEntriesCount + * @property {number|Long|null} [deletedEntriesCount] ImportEntriesResponse deletedEntriesCount + */ + + /** + * Constructs a new ImportEntriesResponse. + * @memberof google.cloud.datacatalog.v1 + * @classdesc Represents an ImportEntriesResponse. + * @implements IImportEntriesResponse + * @constructor + * @param {google.cloud.datacatalog.v1.IImportEntriesResponse=} [properties] Properties to set + */ + function ImportEntriesResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImportEntriesResponse upsertedEntriesCount. + * @member {number|Long|null|undefined} upsertedEntriesCount + * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse + * @instance + */ + ImportEntriesResponse.prototype.upsertedEntriesCount = null; + + /** + * ImportEntriesResponse deletedEntriesCount. + * @member {number|Long|null|undefined} deletedEntriesCount + * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse + * @instance + */ + ImportEntriesResponse.prototype.deletedEntriesCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ImportEntriesResponse _upsertedEntriesCount. + * @member {"upsertedEntriesCount"|undefined} _upsertedEntriesCount + * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse + * @instance + */ + Object.defineProperty(ImportEntriesResponse.prototype, "_upsertedEntriesCount", { + get: $util.oneOfGetter($oneOfFields = ["upsertedEntriesCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ImportEntriesResponse _deletedEntriesCount. + * @member {"deletedEntriesCount"|undefined} _deletedEntriesCount + * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse + * @instance + */ + Object.defineProperty(ImportEntriesResponse.prototype, "_deletedEntriesCount", { + get: $util.oneOfGetter($oneOfFields = ["deletedEntriesCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImportEntriesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse + * @static + * @param {google.cloud.datacatalog.v1.IImportEntriesResponse=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.ImportEntriesResponse} ImportEntriesResponse instance + */ + ImportEntriesResponse.create = function create(properties) { + return new ImportEntriesResponse(properties); + }; + + /** + * Encodes the specified ImportEntriesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.ImportEntriesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse + * @static + * @param {google.cloud.datacatalog.v1.IImportEntriesResponse} message ImportEntriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportEntriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.upsertedEntriesCount != null && Object.hasOwnProperty.call(message, "upsertedEntriesCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.upsertedEntriesCount); + if (message.deletedEntriesCount != null && Object.hasOwnProperty.call(message, "deletedEntriesCount")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.deletedEntriesCount); + return writer; + }; + + /** + * Encodes the specified ImportEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ImportEntriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse + * @static + * @param {google.cloud.datacatalog.v1.IImportEntriesResponse} message ImportEntriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportEntriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse + * @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.ImportEntriesResponse} ImportEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportEntriesResponse.decode = function decode(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.ImportEntriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: { + message.upsertedEntriesCount = reader.int64(); + break; + } + case 6: { + message.deletedEntriesCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportEntriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.ImportEntriesResponse} ImportEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportEntriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportEntriesResponse message. + * @function verify + * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportEntriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.upsertedEntriesCount != null && message.hasOwnProperty("upsertedEntriesCount")) { + properties._upsertedEntriesCount = 1; + if (!$util.isInteger(message.upsertedEntriesCount) && !(message.upsertedEntriesCount && $util.isInteger(message.upsertedEntriesCount.low) && $util.isInteger(message.upsertedEntriesCount.high))) + return "upsertedEntriesCount: integer|Long expected"; + } + if (message.deletedEntriesCount != null && message.hasOwnProperty("deletedEntriesCount")) { + properties._deletedEntriesCount = 1; + if (!$util.isInteger(message.deletedEntriesCount) && !(message.deletedEntriesCount && $util.isInteger(message.deletedEntriesCount.low) && $util.isInteger(message.deletedEntriesCount.high))) + return "deletedEntriesCount: integer|Long expected"; + } + return null; + }; + + /** + * Creates an ImportEntriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.ImportEntriesResponse} ImportEntriesResponse + */ + ImportEntriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.ImportEntriesResponse) + return object; + var message = new $root.google.cloud.datacatalog.v1.ImportEntriesResponse(); + if (object.upsertedEntriesCount != null) + if ($util.Long) + (message.upsertedEntriesCount = $util.Long.fromValue(object.upsertedEntriesCount)).unsigned = false; + else if (typeof object.upsertedEntriesCount === "string") + message.upsertedEntriesCount = parseInt(object.upsertedEntriesCount, 10); + else if (typeof object.upsertedEntriesCount === "number") + message.upsertedEntriesCount = object.upsertedEntriesCount; + else if (typeof object.upsertedEntriesCount === "object") + message.upsertedEntriesCount = new $util.LongBits(object.upsertedEntriesCount.low >>> 0, object.upsertedEntriesCount.high >>> 0).toNumber(); + if (object.deletedEntriesCount != null) + if ($util.Long) + (message.deletedEntriesCount = $util.Long.fromValue(object.deletedEntriesCount)).unsigned = false; + else if (typeof object.deletedEntriesCount === "string") + message.deletedEntriesCount = parseInt(object.deletedEntriesCount, 10); + else if (typeof object.deletedEntriesCount === "number") + message.deletedEntriesCount = object.deletedEntriesCount; + else if (typeof object.deletedEntriesCount === "object") + message.deletedEntriesCount = new $util.LongBits(object.deletedEntriesCount.low >>> 0, object.deletedEntriesCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an ImportEntriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse + * @static + * @param {google.cloud.datacatalog.v1.ImportEntriesResponse} message ImportEntriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportEntriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.upsertedEntriesCount != null && message.hasOwnProperty("upsertedEntriesCount")) { + if (typeof message.upsertedEntriesCount === "number") + object.upsertedEntriesCount = options.longs === String ? String(message.upsertedEntriesCount) : message.upsertedEntriesCount; + else + object.upsertedEntriesCount = options.longs === String ? $util.Long.prototype.toString.call(message.upsertedEntriesCount) : options.longs === Number ? new $util.LongBits(message.upsertedEntriesCount.low >>> 0, message.upsertedEntriesCount.high >>> 0).toNumber() : message.upsertedEntriesCount; + if (options.oneofs) + object._upsertedEntriesCount = "upsertedEntriesCount"; + } + if (message.deletedEntriesCount != null && message.hasOwnProperty("deletedEntriesCount")) { + if (typeof message.deletedEntriesCount === "number") + object.deletedEntriesCount = options.longs === String ? String(message.deletedEntriesCount) : message.deletedEntriesCount; + else + object.deletedEntriesCount = options.longs === String ? $util.Long.prototype.toString.call(message.deletedEntriesCount) : options.longs === Number ? new $util.LongBits(message.deletedEntriesCount.low >>> 0, message.deletedEntriesCount.high >>> 0).toNumber() : message.deletedEntriesCount; + if (options.oneofs) + object._deletedEntriesCount = "deletedEntriesCount"; + } + return object; + }; + + /** + * Converts this ImportEntriesResponse to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse + * @instance + * @returns {Object.} JSON object + */ + ImportEntriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportEntriesResponse + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportEntriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.ImportEntriesResponse"; + }; + + return ImportEntriesResponse; + })(); + + v1.ImportEntriesMetadata = (function() { + + /** + * Properties of an ImportEntriesMetadata. + * @memberof google.cloud.datacatalog.v1 + * @interface IImportEntriesMetadata + * @property {google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState|null} [state] ImportEntriesMetadata state + * @property {Array.|null} [errors] ImportEntriesMetadata errors + */ + + /** + * Constructs a new ImportEntriesMetadata. + * @memberof google.cloud.datacatalog.v1 + * @classdesc Represents an ImportEntriesMetadata. + * @implements IImportEntriesMetadata + * @constructor + * @param {google.cloud.datacatalog.v1.IImportEntriesMetadata=} [properties] Properties to set + */ + function ImportEntriesMetadata(properties) { + this.errors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImportEntriesMetadata state. + * @member {google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState} state + * @memberof google.cloud.datacatalog.v1.ImportEntriesMetadata + * @instance + */ + ImportEntriesMetadata.prototype.state = 0; + + /** + * ImportEntriesMetadata errors. + * @member {Array.} errors + * @memberof google.cloud.datacatalog.v1.ImportEntriesMetadata + * @instance + */ + ImportEntriesMetadata.prototype.errors = $util.emptyArray; + + /** + * Creates a new ImportEntriesMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.ImportEntriesMetadata + * @static + * @param {google.cloud.datacatalog.v1.IImportEntriesMetadata=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.ImportEntriesMetadata} ImportEntriesMetadata instance + */ + ImportEntriesMetadata.create = function create(properties) { + return new ImportEntriesMetadata(properties); + }; + + /** + * Encodes the specified ImportEntriesMetadata message. Does not implicitly {@link google.cloud.datacatalog.v1.ImportEntriesMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.ImportEntriesMetadata + * @static + * @param {google.cloud.datacatalog.v1.IImportEntriesMetadata} message ImportEntriesMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportEntriesMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.rpc.Status.encode(message.errors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ImportEntriesMetadata message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ImportEntriesMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.ImportEntriesMetadata + * @static + * @param {google.cloud.datacatalog.v1.IImportEntriesMetadata} message ImportEntriesMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportEntriesMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportEntriesMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.ImportEntriesMetadata + * @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.ImportEntriesMetadata} ImportEntriesMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportEntriesMetadata.decode = function decode(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.ImportEntriesMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.rpc.Status.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportEntriesMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.ImportEntriesMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.ImportEntriesMetadata} ImportEntriesMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportEntriesMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportEntriesMetadata message. + * @function verify + * @memberof google.cloud.datacatalog.v1.ImportEntriesMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportEntriesMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.rpc.Status.verify(message.errors[i]); + if (error) + return "errors." + error; + } + } + return null; + }; + + /** + * Creates an ImportEntriesMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.ImportEntriesMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.ImportEntriesMetadata} ImportEntriesMetadata + */ + ImportEntriesMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.ImportEntriesMetadata) + return object; + var message = new $root.google.cloud.datacatalog.v1.ImportEntriesMetadata(); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "IMPORT_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "IMPORT_QUEUED": + case 1: + message.state = 1; + break; + case "IMPORT_IN_PROGRESS": + case 2: + message.state = 2; + break; + case "IMPORT_DONE": + case 3: + message.state = 3; + break; + case "IMPORT_OBSOLETE": + case 4: + message.state = 4; + break; + } + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.cloud.datacatalog.v1.ImportEntriesMetadata.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.cloud.datacatalog.v1.ImportEntriesMetadata.errors: object expected"); + message.errors[i] = $root.google.rpc.Status.fromObject(object.errors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ImportEntriesMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.ImportEntriesMetadata + * @static + * @param {google.cloud.datacatalog.v1.ImportEntriesMetadata} message ImportEntriesMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportEntriesMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.errors = []; + if (options.defaults) + object.state = options.enums === String ? "IMPORT_STATE_UNSPECIFIED" : 0; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState[message.state] === undefined ? message.state : $root.google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState[message.state] : message.state; + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.rpc.Status.toObject(message.errors[j], options); + } + return object; + }; + + /** + * Converts this ImportEntriesMetadata to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.ImportEntriesMetadata + * @instance + * @returns {Object.} JSON object + */ + ImportEntriesMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportEntriesMetadata + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.ImportEntriesMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportEntriesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.ImportEntriesMetadata"; + }; + + /** + * ImportState enum. + * @name google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState + * @enum {number} + * @property {number} IMPORT_STATE_UNSPECIFIED=0 IMPORT_STATE_UNSPECIFIED value + * @property {number} IMPORT_QUEUED=1 IMPORT_QUEUED value + * @property {number} IMPORT_IN_PROGRESS=2 IMPORT_IN_PROGRESS value + * @property {number} IMPORT_DONE=3 IMPORT_DONE value + * @property {number} IMPORT_OBSOLETE=4 IMPORT_OBSOLETE value + */ + ImportEntriesMetadata.ImportState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IMPORT_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IMPORT_QUEUED"] = 1; + values[valuesById[2] = "IMPORT_IN_PROGRESS"] = 2; + values[valuesById[3] = "IMPORT_DONE"] = 3; + values[valuesById[4] = "IMPORT_OBSOLETE"] = 4; + return values; + })(); + + return ImportEntriesMetadata; + })(); + + 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 + * @property {number} DATABASE_SCHEMA=15 DATABASE_SCHEMA value + * @property {number} DASHBOARD=16 DASHBOARD value + * @property {number} EXPLORE=17 EXPLORE value + * @property {number} LOOK=18 LOOK value + * @property {number} FEATURE_ONLINE_STORE=19 FEATURE_ONLINE_STORE value + * @property {number} FEATURE_VIEW=20 FEATURE_VIEW value + * @property {number} FEATURE_GROUP=21 FEATURE_GROUP 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; + values[valuesById[15] = "DATABASE_SCHEMA"] = 15; + values[valuesById[16] = "DASHBOARD"] = 16; + values[valuesById[17] = "EXPLORE"] = 17; + values[valuesById[18] = "LOOK"] = 18; + values[valuesById[19] = "FEATURE_ONLINE_STORE"] = 19; + values[valuesById[20] = "FEATURE_VIEW"] = 20; + values[valuesById[21] = "FEATURE_GROUP"] = 21; + return values; + })(); + + v1.SetConfigRequest = (function() { + + /** + * Properties of a SetConfigRequest. + * @memberof google.cloud.datacatalog.v1 + * @interface ISetConfigRequest + * @property {string|null} [name] SetConfigRequest name + * @property {google.cloud.datacatalog.v1.TagTemplateMigration|null} [tagTemplateMigration] SetConfigRequest tagTemplateMigration + * @property {google.cloud.datacatalog.v1.CatalogUIExperience|null} [catalogUiExperience] SetConfigRequest catalogUiExperience + */ + + /** + * Constructs a new SetConfigRequest. + * @memberof google.cloud.datacatalog.v1 + * @classdesc Represents a SetConfigRequest. + * @implements ISetConfigRequest + * @constructor + * @param {google.cloud.datacatalog.v1.ISetConfigRequest=} [properties] Properties to set + */ + function SetConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetConfigRequest name. + * @member {string} name + * @memberof google.cloud.datacatalog.v1.SetConfigRequest + * @instance + */ + SetConfigRequest.prototype.name = ""; + + /** + * SetConfigRequest tagTemplateMigration. + * @member {google.cloud.datacatalog.v1.TagTemplateMigration|null|undefined} tagTemplateMigration + * @memberof google.cloud.datacatalog.v1.SetConfigRequest + * @instance + */ + SetConfigRequest.prototype.tagTemplateMigration = null; + + /** + * SetConfigRequest catalogUiExperience. + * @member {google.cloud.datacatalog.v1.CatalogUIExperience|null|undefined} catalogUiExperience + * @memberof google.cloud.datacatalog.v1.SetConfigRequest + * @instance + */ + SetConfigRequest.prototype.catalogUiExperience = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SetConfigRequest configuration. + * @member {"tagTemplateMigration"|"catalogUiExperience"|undefined} configuration + * @memberof google.cloud.datacatalog.v1.SetConfigRequest + * @instance + */ + Object.defineProperty(SetConfigRequest.prototype, "configuration", { + get: $util.oneOfGetter($oneOfFields = ["tagTemplateMigration", "catalogUiExperience"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SetConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.SetConfigRequest + * @static + * @param {google.cloud.datacatalog.v1.ISetConfigRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.SetConfigRequest} SetConfigRequest instance + */ + SetConfigRequest.create = function create(properties) { + return new SetConfigRequest(properties); + }; + + /** + * Encodes the specified SetConfigRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.SetConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.SetConfigRequest + * @static + * @param {google.cloud.datacatalog.v1.ISetConfigRequest} message SetConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetConfigRequest.encode = function encode(message, writer) { + 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.tagTemplateMigration != null && Object.hasOwnProperty.call(message, "tagTemplateMigration")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.tagTemplateMigration); + if (message.catalogUiExperience != null && Object.hasOwnProperty.call(message, "catalogUiExperience")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.catalogUiExperience); + return writer; + }; + + /** + * Encodes the specified SetConfigRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.SetConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.SetConfigRequest + * @static + * @param {google.cloud.datacatalog.v1.ISetConfigRequest} message SetConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.SetConfigRequest + * @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.SetConfigRequest} SetConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetConfigRequest.decode = function decode(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.SetConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.tagTemplateMigration = reader.int32(); + break; + } + case 3: { + message.catalogUiExperience = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.SetConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.SetConfigRequest} SetConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetConfigRequest message. + * @function verify + * @memberof google.cloud.datacatalog.v1.SetConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetConfigRequest.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.tagTemplateMigration != null && message.hasOwnProperty("tagTemplateMigration")) { + properties.configuration = 1; + switch (message.tagTemplateMigration) { + default: + return "tagTemplateMigration: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.catalogUiExperience != null && message.hasOwnProperty("catalogUiExperience")) { + if (properties.configuration === 1) + return "configuration: multiple values"; + properties.configuration = 1; + switch (message.catalogUiExperience) { + default: + return "catalogUiExperience: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a SetConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.SetConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.SetConfigRequest} SetConfigRequest + */ + SetConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.SetConfigRequest) + return object; + var message = new $root.google.cloud.datacatalog.v1.SetConfigRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.tagTemplateMigration) { + default: + if (typeof object.tagTemplateMigration === "number") { + message.tagTemplateMigration = object.tagTemplateMigration; + break; + } + break; + case "TAG_TEMPLATE_MIGRATION_UNSPECIFIED": + case 0: + message.tagTemplateMigration = 0; + break; + case "TAG_TEMPLATE_MIGRATION_ENABLED": + case 1: + message.tagTemplateMigration = 1; + break; + case "TAG_TEMPLATE_MIGRATION_DISABLED": + case 2: + message.tagTemplateMigration = 2; + break; + } + switch (object.catalogUiExperience) { + default: + if (typeof object.catalogUiExperience === "number") { + message.catalogUiExperience = object.catalogUiExperience; + break; + } + break; + case "CATALOG_UI_EXPERIENCE_UNSPECIFIED": + case 0: + message.catalogUiExperience = 0; + break; + case "CATALOG_UI_EXPERIENCE_ENABLED": + case 1: + message.catalogUiExperience = 1; + break; + case "CATALOG_UI_EXPERIENCE_DISABLED": + case 2: + message.catalogUiExperience = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a SetConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.SetConfigRequest + * @static + * @param {google.cloud.datacatalog.v1.SetConfigRequest} message SetConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.tagTemplateMigration != null && message.hasOwnProperty("tagTemplateMigration")) { + object.tagTemplateMigration = options.enums === String ? $root.google.cloud.datacatalog.v1.TagTemplateMigration[message.tagTemplateMigration] === undefined ? message.tagTemplateMigration : $root.google.cloud.datacatalog.v1.TagTemplateMigration[message.tagTemplateMigration] : message.tagTemplateMigration; + if (options.oneofs) + object.configuration = "tagTemplateMigration"; + } + if (message.catalogUiExperience != null && message.hasOwnProperty("catalogUiExperience")) { + object.catalogUiExperience = options.enums === String ? $root.google.cloud.datacatalog.v1.CatalogUIExperience[message.catalogUiExperience] === undefined ? message.catalogUiExperience : $root.google.cloud.datacatalog.v1.CatalogUIExperience[message.catalogUiExperience] : message.catalogUiExperience; + if (options.oneofs) + object.configuration = "catalogUiExperience"; + } + return object; + }; + + /** + * Converts this SetConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.SetConfigRequest + * @instance + * @returns {Object.} JSON object + */ + SetConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetConfigRequest + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.SetConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.SetConfigRequest"; + }; + + return SetConfigRequest; + })(); + + v1.RetrieveConfigRequest = (function() { + + /** + * Properties of a RetrieveConfigRequest. + * @memberof google.cloud.datacatalog.v1 + * @interface IRetrieveConfigRequest + * @property {string|null} [name] RetrieveConfigRequest name + */ + + /** + * Constructs a new RetrieveConfigRequest. + * @memberof google.cloud.datacatalog.v1 + * @classdesc Represents a RetrieveConfigRequest. + * @implements IRetrieveConfigRequest + * @constructor + * @param {google.cloud.datacatalog.v1.IRetrieveConfigRequest=} [properties] Properties to set + */ + function RetrieveConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RetrieveConfigRequest name. + * @member {string} name + * @memberof google.cloud.datacatalog.v1.RetrieveConfigRequest + * @instance + */ + RetrieveConfigRequest.prototype.name = ""; + + /** + * Creates a new RetrieveConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.RetrieveConfigRequest + * @static + * @param {google.cloud.datacatalog.v1.IRetrieveConfigRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.RetrieveConfigRequest} RetrieveConfigRequest instance + */ + RetrieveConfigRequest.create = function create(properties) { + return new RetrieveConfigRequest(properties); + }; + + /** + * Encodes the specified RetrieveConfigRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.RetrieveConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.RetrieveConfigRequest + * @static + * @param {google.cloud.datacatalog.v1.IRetrieveConfigRequest} message RetrieveConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetrieveConfigRequest.encode = function encode(message, writer) { + 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 RetrieveConfigRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.RetrieveConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.RetrieveConfigRequest + * @static + * @param {google.cloud.datacatalog.v1.IRetrieveConfigRequest} message RetrieveConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetrieveConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RetrieveConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.RetrieveConfigRequest + * @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.RetrieveConfigRequest} RetrieveConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetrieveConfigRequest.decode = function decode(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.RetrieveConfigRequest(); + 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 RetrieveConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.RetrieveConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.RetrieveConfigRequest} RetrieveConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetrieveConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RetrieveConfigRequest message. + * @function verify + * @memberof google.cloud.datacatalog.v1.RetrieveConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RetrieveConfigRequest.verify = function verify(message) { + if (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 RetrieveConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.RetrieveConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.RetrieveConfigRequest} RetrieveConfigRequest + */ + RetrieveConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.RetrieveConfigRequest) + return object; + var message = new $root.google.cloud.datacatalog.v1.RetrieveConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a RetrieveConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.RetrieveConfigRequest + * @static + * @param {google.cloud.datacatalog.v1.RetrieveConfigRequest} message RetrieveConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RetrieveConfigRequest.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 RetrieveConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.RetrieveConfigRequest + * @instance + * @returns {Object.} JSON object + */ + RetrieveConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RetrieveConfigRequest + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.RetrieveConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RetrieveConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.RetrieveConfigRequest"; + }; + + return RetrieveConfigRequest; + })(); + + v1.RetrieveEffectiveConfigRequest = (function() { + + /** + * Properties of a RetrieveEffectiveConfigRequest. + * @memberof google.cloud.datacatalog.v1 + * @interface IRetrieveEffectiveConfigRequest + * @property {string|null} [name] RetrieveEffectiveConfigRequest name + */ + + /** + * Constructs a new RetrieveEffectiveConfigRequest. + * @memberof google.cloud.datacatalog.v1 + * @classdesc Represents a RetrieveEffectiveConfigRequest. + * @implements IRetrieveEffectiveConfigRequest + * @constructor + * @param {google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest=} [properties] Properties to set + */ + function RetrieveEffectiveConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RetrieveEffectiveConfigRequest name. + * @member {string} name + * @memberof google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest + * @instance + */ + RetrieveEffectiveConfigRequest.prototype.name = ""; + + /** + * Creates a new RetrieveEffectiveConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest + * @static + * @param {google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest} RetrieveEffectiveConfigRequest instance + */ + RetrieveEffectiveConfigRequest.create = function create(properties) { + return new RetrieveEffectiveConfigRequest(properties); + }; + + /** + * Encodes the specified RetrieveEffectiveConfigRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest + * @static + * @param {google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest} message RetrieveEffectiveConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetrieveEffectiveConfigRequest.encode = function encode(message, writer) { + 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 RetrieveEffectiveConfigRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest + * @static + * @param {google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest} message RetrieveEffectiveConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetrieveEffectiveConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RetrieveEffectiveConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest + * @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.RetrieveEffectiveConfigRequest} RetrieveEffectiveConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetrieveEffectiveConfigRequest.decode = function decode(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.RetrieveEffectiveConfigRequest(); + 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 RetrieveEffectiveConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest} RetrieveEffectiveConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetrieveEffectiveConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RetrieveEffectiveConfigRequest message. + * @function verify + * @memberof google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RetrieveEffectiveConfigRequest.verify = function verify(message) { + if (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 RetrieveEffectiveConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest} RetrieveEffectiveConfigRequest + */ + RetrieveEffectiveConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest) + return object; + var message = new $root.google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a RetrieveEffectiveConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest + * @static + * @param {google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest} message RetrieveEffectiveConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RetrieveEffectiveConfigRequest.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 RetrieveEffectiveConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest + * @instance + * @returns {Object.} JSON object + */ + RetrieveEffectiveConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RetrieveEffectiveConfigRequest + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RetrieveEffectiveConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest"; + }; + + return RetrieveEffectiveConfigRequest; + })(); + + /** + * TagTemplateMigration enum. + * @name google.cloud.datacatalog.v1.TagTemplateMigration + * @enum {number} + * @property {number} TAG_TEMPLATE_MIGRATION_UNSPECIFIED=0 TAG_TEMPLATE_MIGRATION_UNSPECIFIED value + * @property {number} TAG_TEMPLATE_MIGRATION_ENABLED=1 TAG_TEMPLATE_MIGRATION_ENABLED value + * @property {number} TAG_TEMPLATE_MIGRATION_DISABLED=2 TAG_TEMPLATE_MIGRATION_DISABLED value + */ + v1.TagTemplateMigration = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TAG_TEMPLATE_MIGRATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "TAG_TEMPLATE_MIGRATION_ENABLED"] = 1; + values[valuesById[2] = "TAG_TEMPLATE_MIGRATION_DISABLED"] = 2; + return values; + })(); + + /** + * CatalogUIExperience enum. + * @name google.cloud.datacatalog.v1.CatalogUIExperience + * @enum {number} + * @property {number} CATALOG_UI_EXPERIENCE_UNSPECIFIED=0 CATALOG_UI_EXPERIENCE_UNSPECIFIED value + * @property {number} CATALOG_UI_EXPERIENCE_ENABLED=1 CATALOG_UI_EXPERIENCE_ENABLED value + * @property {number} CATALOG_UI_EXPERIENCE_DISABLED=2 CATALOG_UI_EXPERIENCE_DISABLED value + */ + v1.CatalogUIExperience = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CATALOG_UI_EXPERIENCE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CATALOG_UI_EXPERIENCE_ENABLED"] = 1; + values[valuesById[2] = "CATALOG_UI_EXPERIENCE_DISABLED"] = 2; + return values; + })(); + + v1.OrganizationConfig = (function() { + + /** + * Properties of an OrganizationConfig. + * @memberof google.cloud.datacatalog.v1 + * @interface IOrganizationConfig + * @property {Object.|null} [config] OrganizationConfig config + */ + + /** + * Constructs a new OrganizationConfig. + * @memberof google.cloud.datacatalog.v1 + * @classdesc Represents an OrganizationConfig. + * @implements IOrganizationConfig + * @constructor + * @param {google.cloud.datacatalog.v1.IOrganizationConfig=} [properties] Properties to set + */ + function OrganizationConfig(properties) { + this.config = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OrganizationConfig config. + * @member {Object.} config + * @memberof google.cloud.datacatalog.v1.OrganizationConfig + * @instance + */ + OrganizationConfig.prototype.config = $util.emptyObject; + + /** + * Creates a new OrganizationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.OrganizationConfig + * @static + * @param {google.cloud.datacatalog.v1.IOrganizationConfig=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.OrganizationConfig} OrganizationConfig instance + */ + OrganizationConfig.create = function create(properties) { + return new OrganizationConfig(properties); + }; + + /** + * Encodes the specified OrganizationConfig message. Does not implicitly {@link google.cloud.datacatalog.v1.OrganizationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.OrganizationConfig + * @static + * @param {google.cloud.datacatalog.v1.IOrganizationConfig} message OrganizationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrganizationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + for (var keys = Object.keys(message.config), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.datacatalog.v1.MigrationConfig.encode(message.config[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified OrganizationConfig message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.OrganizationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.OrganizationConfig + * @static + * @param {google.cloud.datacatalog.v1.IOrganizationConfig} message OrganizationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrganizationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OrganizationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.OrganizationConfig + * @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.OrganizationConfig} OrganizationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrganizationConfig.decode = function decode(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.OrganizationConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.config === $util.emptyObject) + message.config = {}; + 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.MigrationConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.config[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OrganizationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.OrganizationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.OrganizationConfig} OrganizationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrganizationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OrganizationConfig message. + * @function verify + * @memberof google.cloud.datacatalog.v1.OrganizationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OrganizationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.config != null && message.hasOwnProperty("config")) { + if (!$util.isObject(message.config)) + return "config: object expected"; + var key = Object.keys(message.config); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.datacatalog.v1.MigrationConfig.verify(message.config[key[i]]); + if (error) + return "config." + error; + } + } + return null; + }; + + /** + * Creates an OrganizationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.OrganizationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.OrganizationConfig} OrganizationConfig + */ + OrganizationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.OrganizationConfig) + return object; + var message = new $root.google.cloud.datacatalog.v1.OrganizationConfig(); + if (object.config) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.datacatalog.v1.OrganizationConfig.config: object expected"); + message.config = {}; + for (var keys = Object.keys(object.config), i = 0; i < keys.length; ++i) { + if (typeof object.config[keys[i]] !== "object") + throw TypeError(".google.cloud.datacatalog.v1.OrganizationConfig.config: object expected"); + message.config[keys[i]] = $root.google.cloud.datacatalog.v1.MigrationConfig.fromObject(object.config[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from an OrganizationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.OrganizationConfig + * @static + * @param {google.cloud.datacatalog.v1.OrganizationConfig} message OrganizationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OrganizationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.config = {}; + var keys2; + if (message.config && (keys2 = Object.keys(message.config)).length) { + object.config = {}; + for (var j = 0; j < keys2.length; ++j) + object.config[keys2[j]] = $root.google.cloud.datacatalog.v1.MigrationConfig.toObject(message.config[keys2[j]], options); + } + return object; + }; + + /** + * Converts this OrganizationConfig to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.OrganizationConfig + * @instance + * @returns {Object.} JSON object + */ + OrganizationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OrganizationConfig + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.OrganizationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OrganizationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.OrganizationConfig"; + }; + + return OrganizationConfig; + })(); + + v1.MigrationConfig = (function() { + + /** + * Properties of a MigrationConfig. + * @memberof google.cloud.datacatalog.v1 + * @interface IMigrationConfig + * @property {google.cloud.datacatalog.v1.TagTemplateMigration|null} [tagTemplateMigration] MigrationConfig tagTemplateMigration + * @property {google.cloud.datacatalog.v1.CatalogUIExperience|null} [catalogUiExperience] MigrationConfig catalogUiExperience + */ + + /** + * Constructs a new MigrationConfig. + * @memberof google.cloud.datacatalog.v1 + * @classdesc Represents a MigrationConfig. + * @implements IMigrationConfig + * @constructor + * @param {google.cloud.datacatalog.v1.IMigrationConfig=} [properties] Properties to set + */ + function MigrationConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MigrationConfig tagTemplateMigration. + * @member {google.cloud.datacatalog.v1.TagTemplateMigration} tagTemplateMigration + * @memberof google.cloud.datacatalog.v1.MigrationConfig + * @instance + */ + MigrationConfig.prototype.tagTemplateMigration = 0; + + /** + * MigrationConfig catalogUiExperience. + * @member {google.cloud.datacatalog.v1.CatalogUIExperience} catalogUiExperience + * @memberof google.cloud.datacatalog.v1.MigrationConfig + * @instance + */ + MigrationConfig.prototype.catalogUiExperience = 0; + + /** + * Creates a new MigrationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.MigrationConfig + * @static + * @param {google.cloud.datacatalog.v1.IMigrationConfig=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.MigrationConfig} MigrationConfig instance + */ + MigrationConfig.create = function create(properties) { + return new MigrationConfig(properties); + }; + + /** + * Encodes the specified MigrationConfig message. Does not implicitly {@link google.cloud.datacatalog.v1.MigrationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.MigrationConfig + * @static + * @param {google.cloud.datacatalog.v1.IMigrationConfig} message MigrationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MigrationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tagTemplateMigration != null && Object.hasOwnProperty.call(message, "tagTemplateMigration")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tagTemplateMigration); + if (message.catalogUiExperience != null && Object.hasOwnProperty.call(message, "catalogUiExperience")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.catalogUiExperience); + return writer; + }; + + /** + * Encodes the specified MigrationConfig message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.MigrationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.MigrationConfig + * @static + * @param {google.cloud.datacatalog.v1.IMigrationConfig} message MigrationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MigrationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MigrationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.MigrationConfig + * @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.MigrationConfig} MigrationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigrationConfig.decode = function decode(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.MigrationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tagTemplateMigration = reader.int32(); + break; + } + case 2: { + message.catalogUiExperience = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MigrationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.MigrationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.MigrationConfig} MigrationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigrationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MigrationConfig message. + * @function verify + * @memberof google.cloud.datacatalog.v1.MigrationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MigrationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tagTemplateMigration != null && message.hasOwnProperty("tagTemplateMigration")) + switch (message.tagTemplateMigration) { + default: + return "tagTemplateMigration: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.catalogUiExperience != null && message.hasOwnProperty("catalogUiExperience")) + switch (message.catalogUiExperience) { + default: + return "catalogUiExperience: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a MigrationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.MigrationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.MigrationConfig} MigrationConfig + */ + MigrationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.MigrationConfig) + return object; + var message = new $root.google.cloud.datacatalog.v1.MigrationConfig(); + switch (object.tagTemplateMigration) { + default: + if (typeof object.tagTemplateMigration === "number") { + message.tagTemplateMigration = object.tagTemplateMigration; + break; + } + break; + case "TAG_TEMPLATE_MIGRATION_UNSPECIFIED": + case 0: + message.tagTemplateMigration = 0; + break; + case "TAG_TEMPLATE_MIGRATION_ENABLED": + case 1: + message.tagTemplateMigration = 1; + break; + case "TAG_TEMPLATE_MIGRATION_DISABLED": + case 2: + message.tagTemplateMigration = 2; + break; + } + switch (object.catalogUiExperience) { + default: + if (typeof object.catalogUiExperience === "number") { + message.catalogUiExperience = object.catalogUiExperience; + break; + } + break; + case "CATALOG_UI_EXPERIENCE_UNSPECIFIED": + case 0: + message.catalogUiExperience = 0; + break; + case "CATALOG_UI_EXPERIENCE_ENABLED": + case 1: + message.catalogUiExperience = 1; + break; + case "CATALOG_UI_EXPERIENCE_DISABLED": + case 2: + message.catalogUiExperience = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a MigrationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.MigrationConfig + * @static + * @param {google.cloud.datacatalog.v1.MigrationConfig} message MigrationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MigrationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tagTemplateMigration = options.enums === String ? "TAG_TEMPLATE_MIGRATION_UNSPECIFIED" : 0; + object.catalogUiExperience = options.enums === String ? "CATALOG_UI_EXPERIENCE_UNSPECIFIED" : 0; + } + if (message.tagTemplateMigration != null && message.hasOwnProperty("tagTemplateMigration")) + object.tagTemplateMigration = options.enums === String ? $root.google.cloud.datacatalog.v1.TagTemplateMigration[message.tagTemplateMigration] === undefined ? message.tagTemplateMigration : $root.google.cloud.datacatalog.v1.TagTemplateMigration[message.tagTemplateMigration] : message.tagTemplateMigration; + if (message.catalogUiExperience != null && message.hasOwnProperty("catalogUiExperience")) + object.catalogUiExperience = options.enums === String ? $root.google.cloud.datacatalog.v1.CatalogUIExperience[message.catalogUiExperience] === undefined ? message.catalogUiExperience : $root.google.cloud.datacatalog.v1.CatalogUIExperience[message.catalogUiExperience] : message.catalogUiExperience; + return object; + }; + + /** + * Converts this MigrationConfig to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.MigrationConfig + * @instance + * @returns {Object.} JSON object + */ + MigrationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MigrationConfig + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.MigrationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MigrationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.MigrationConfig"; + }; + + return MigrationConfig; + })(); + + 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: + case 6: + case 7: + case 8: + case 9: + case 10: + 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; + case "CLOUD_SPANNER": + case 6: + message.system = 6; + break; + case "CLOUD_BIGTABLE": + case 7: + message.system = 7; + break; + case "CLOUD_SQL": + case 8: + message.system = 8; + break; + case "LOOKER": + case 9: + message.system = 9; + break; + case "VERTEX_AI": + case 10: + message.system = 10; + 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 {string|null} [defaultValue] ColumnSchema defaultValue + * @property {number|null} [ordinalPosition] ColumnSchema ordinalPosition + * @property {google.cloud.datacatalog.v1.ColumnSchema.IndexingType|null} [highestIndexingType] ColumnSchema highestIndexingType + * @property {Array.|null} [subcolumns] ColumnSchema subcolumns + * @property {google.cloud.datacatalog.v1.ColumnSchema.ILookerColumnSpec|null} [lookerColumnSpec] ColumnSchema lookerColumnSpec + * @property {google.cloud.datacatalog.v1.ColumnSchema.IFieldElementType|null} [rangeElementType] ColumnSchema rangeElementType + * @property {string|null} [gcRule] ColumnSchema gcRule + */ + + /** + * 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 defaultValue. + * @member {string} defaultValue + * @memberof google.cloud.datacatalog.v1.ColumnSchema + * @instance + */ + ColumnSchema.prototype.defaultValue = ""; + + /** + * ColumnSchema ordinalPosition. + * @member {number} ordinalPosition + * @memberof google.cloud.datacatalog.v1.ColumnSchema + * @instance + */ + ColumnSchema.prototype.ordinalPosition = 0; + + /** + * ColumnSchema highestIndexingType. + * @member {google.cloud.datacatalog.v1.ColumnSchema.IndexingType} highestIndexingType + * @memberof google.cloud.datacatalog.v1.ColumnSchema + * @instance + */ + ColumnSchema.prototype.highestIndexingType = 0; + + /** + * ColumnSchema subcolumns. + * @member {Array.} subcolumns + * @memberof google.cloud.datacatalog.v1.ColumnSchema + * @instance + */ + ColumnSchema.prototype.subcolumns = $util.emptyArray; + + /** + * ColumnSchema lookerColumnSpec. + * @member {google.cloud.datacatalog.v1.ColumnSchema.ILookerColumnSpec|null|undefined} lookerColumnSpec + * @memberof google.cloud.datacatalog.v1.ColumnSchema + * @instance + */ + ColumnSchema.prototype.lookerColumnSpec = null; + + /** + * ColumnSchema rangeElementType. + * @member {google.cloud.datacatalog.v1.ColumnSchema.IFieldElementType|null|undefined} rangeElementType + * @memberof google.cloud.datacatalog.v1.ColumnSchema + * @instance + */ + ColumnSchema.prototype.rangeElementType = null; + + /** + * ColumnSchema gcRule. + * @member {string} gcRule + * @memberof google.cloud.datacatalog.v1.ColumnSchema + * @instance + */ + ColumnSchema.prototype.gcRule = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ColumnSchema systemSpec. + * @member {"lookerColumnSpec"|undefined} systemSpec + * @memberof google.cloud.datacatalog.v1.ColumnSchema + * @instance + */ + Object.defineProperty(ColumnSchema.prototype, "systemSpec", { + get: $util.oneOfGetter($oneOfFields = ["lookerColumnSpec"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * 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(); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.defaultValue); + if (message.ordinalPosition != null && Object.hasOwnProperty.call(message, "ordinalPosition")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.ordinalPosition); + if (message.highestIndexingType != null && Object.hasOwnProperty.call(message, "highestIndexingType")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.highestIndexingType); + if (message.gcRule != null && Object.hasOwnProperty.call(message, "gcRule")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.gcRule); + if (message.lookerColumnSpec != null && Object.hasOwnProperty.call(message, "lookerColumnSpec")) + $root.google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.encode(message.lookerColumnSpec, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.rangeElementType != null && Object.hasOwnProperty.call(message, "rangeElementType")) + $root.google.cloud.datacatalog.v1.ColumnSchema.FieldElementType.encode(message.rangeElementType, writer.uint32(/* id 19, wireType 2 =*/154).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 8: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.ordinalPosition = reader.int32(); + break; + } + case 10: { + message.highestIndexingType = reader.int32(); + 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; + } + case 18: { + message.lookerColumnSpec = $root.google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.decode(reader, reader.uint32()); + break; + } + case 19: { + message.rangeElementType = $root.google.cloud.datacatalog.v1.ColumnSchema.FieldElementType.decode(reader, reader.uint32()); + break; + } + case 11: { + message.gcRule = reader.string(); + 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"; + var properties = {}; + 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.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) + if (!$util.isInteger(message.ordinalPosition)) + return "ordinalPosition: integer expected"; + if (message.highestIndexingType != null && message.hasOwnProperty("highestIndexingType")) + switch (message.highestIndexingType) { + default: + return "highestIndexingType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + 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; + } + } + if (message.lookerColumnSpec != null && message.hasOwnProperty("lookerColumnSpec")) { + properties.systemSpec = 1; + { + var error = $root.google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.verify(message.lookerColumnSpec); + if (error) + return "lookerColumnSpec." + error; + } + } + if (message.rangeElementType != null && message.hasOwnProperty("rangeElementType")) { + var error = $root.google.cloud.datacatalog.v1.ColumnSchema.FieldElementType.verify(message.rangeElementType); + if (error) + return "rangeElementType." + error; + } + if (message.gcRule != null && message.hasOwnProperty("gcRule")) + if (!$util.isString(message.gcRule)) + return "gcRule: string expected"; + 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.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.ordinalPosition != null) + message.ordinalPosition = object.ordinalPosition | 0; + switch (object.highestIndexingType) { + default: + if (typeof object.highestIndexingType === "number") { + message.highestIndexingType = object.highestIndexingType; + break; + } + break; + case "INDEXING_TYPE_UNSPECIFIED": + case 0: + message.highestIndexingType = 0; + break; + case "INDEXING_TYPE_NONE": + case 1: + message.highestIndexingType = 1; + break; + case "INDEXING_TYPE_NON_UNIQUE": + case 2: + message.highestIndexingType = 2; + break; + case "INDEXING_TYPE_UNIQUE": + case 3: + message.highestIndexingType = 3; + break; + case "INDEXING_TYPE_PRIMARY_KEY": + case 4: + message.highestIndexingType = 4; + break; + } + 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]); + } + } + if (object.lookerColumnSpec != null) { + if (typeof object.lookerColumnSpec !== "object") + throw TypeError(".google.cloud.datacatalog.v1.ColumnSchema.lookerColumnSpec: object expected"); + message.lookerColumnSpec = $root.google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.fromObject(object.lookerColumnSpec); + } + if (object.rangeElementType != null) { + if (typeof object.rangeElementType !== "object") + throw TypeError(".google.cloud.datacatalog.v1.ColumnSchema.rangeElementType: object expected"); + message.rangeElementType = $root.google.cloud.datacatalog.v1.ColumnSchema.FieldElementType.fromObject(object.rangeElementType); + } + if (object.gcRule != null) + message.gcRule = String(object.gcRule); + 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 = ""; + object.defaultValue = ""; + object.ordinalPosition = 0; + object.highestIndexingType = options.enums === String ? "INDEXING_TYPE_UNSPECIFIED" : 0; + object.gcRule = ""; + object.rangeElementType = null; + } + 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); + } + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) + object.ordinalPosition = message.ordinalPosition; + if (message.highestIndexingType != null && message.hasOwnProperty("highestIndexingType")) + object.highestIndexingType = options.enums === String ? $root.google.cloud.datacatalog.v1.ColumnSchema.IndexingType[message.highestIndexingType] === undefined ? message.highestIndexingType : $root.google.cloud.datacatalog.v1.ColumnSchema.IndexingType[message.highestIndexingType] : message.highestIndexingType; + if (message.gcRule != null && message.hasOwnProperty("gcRule")) + object.gcRule = message.gcRule; + if (message.lookerColumnSpec != null && message.hasOwnProperty("lookerColumnSpec")) { + object.lookerColumnSpec = $root.google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.toObject(message.lookerColumnSpec, options); + if (options.oneofs) + object.systemSpec = "lookerColumnSpec"; + } + if (message.rangeElementType != null && message.hasOwnProperty("rangeElementType")) + object.rangeElementType = $root.google.cloud.datacatalog.v1.ColumnSchema.FieldElementType.toObject(message.rangeElementType, 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"; + }; + + /** + * IndexingType enum. + * @name google.cloud.datacatalog.v1.ColumnSchema.IndexingType + * @enum {number} + * @property {number} INDEXING_TYPE_UNSPECIFIED=0 INDEXING_TYPE_UNSPECIFIED value + * @property {number} INDEXING_TYPE_NONE=1 INDEXING_TYPE_NONE value + * @property {number} INDEXING_TYPE_NON_UNIQUE=2 INDEXING_TYPE_NON_UNIQUE value + * @property {number} INDEXING_TYPE_UNIQUE=3 INDEXING_TYPE_UNIQUE value + * @property {number} INDEXING_TYPE_PRIMARY_KEY=4 INDEXING_TYPE_PRIMARY_KEY value + */ + ColumnSchema.IndexingType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INDEXING_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INDEXING_TYPE_NONE"] = 1; + values[valuesById[2] = "INDEXING_TYPE_NON_UNIQUE"] = 2; + values[valuesById[3] = "INDEXING_TYPE_UNIQUE"] = 3; + values[valuesById[4] = "INDEXING_TYPE_PRIMARY_KEY"] = 4; + return values; + })(); + + ColumnSchema.LookerColumnSpec = (function() { + + /** + * Properties of a LookerColumnSpec. + * @memberof google.cloud.datacatalog.v1.ColumnSchema + * @interface ILookerColumnSpec + * @property {google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType|null} [type] LookerColumnSpec type + */ + + /** + * Constructs a new LookerColumnSpec. + * @memberof google.cloud.datacatalog.v1.ColumnSchema + * @classdesc Represents a LookerColumnSpec. + * @implements ILookerColumnSpec + * @constructor + * @param {google.cloud.datacatalog.v1.ColumnSchema.ILookerColumnSpec=} [properties] Properties to set + */ + function LookerColumnSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LookerColumnSpec type. + * @member {google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType} type + * @memberof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec + * @instance + */ + LookerColumnSpec.prototype.type = 0; + + /** + * Creates a new LookerColumnSpec instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec + * @static + * @param {google.cloud.datacatalog.v1.ColumnSchema.ILookerColumnSpec=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec} LookerColumnSpec instance + */ + LookerColumnSpec.create = function create(properties) { + return new LookerColumnSpec(properties); + }; + + /** + * Encodes the specified LookerColumnSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec + * @static + * @param {google.cloud.datacatalog.v1.ColumnSchema.ILookerColumnSpec} message LookerColumnSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LookerColumnSpec.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); + return writer; + }; + + /** + * Encodes the specified LookerColumnSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec + * @static + * @param {google.cloud.datacatalog.v1.ColumnSchema.ILookerColumnSpec} message LookerColumnSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LookerColumnSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LookerColumnSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec + * @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.LookerColumnSpec} LookerColumnSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LookerColumnSpec.decode = function decode(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.LookerColumnSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LookerColumnSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec} LookerColumnSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LookerColumnSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LookerColumnSpec message. + * @function verify + * @memberof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LookerColumnSpec.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: + case 3: + case 4: + case 5: + break; + } + return null; + }; + + /** + * Creates a LookerColumnSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec} LookerColumnSpec + */ + LookerColumnSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec) + return object; + var message = new $root.google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "LOOKER_COLUMN_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "DIMENSION": + case 1: + message.type = 1; + break; + case "DIMENSION_GROUP": + case 2: + message.type = 2; + break; + case "FILTER": + case 3: + message.type = 3; + break; + case "MEASURE": + case 4: + message.type = 4; + break; + case "PARAMETER": + case 5: + message.type = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a LookerColumnSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec + * @static + * @param {google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec} message LookerColumnSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LookerColumnSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.type = options.enums === String ? "LOOKER_COLUMN_TYPE_UNSPECIFIED" : 0; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType[message.type] === undefined ? message.type : $root.google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType[message.type] : message.type; + return object; + }; + + /** + * Converts this LookerColumnSpec to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec + * @instance + * @returns {Object.} JSON object + */ + LookerColumnSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LookerColumnSpec + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LookerColumnSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec"; + }; + + /** + * LookerColumnType enum. + * @name google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType + * @enum {number} + * @property {number} LOOKER_COLUMN_TYPE_UNSPECIFIED=0 LOOKER_COLUMN_TYPE_UNSPECIFIED value + * @property {number} DIMENSION=1 DIMENSION value + * @property {number} DIMENSION_GROUP=2 DIMENSION_GROUP value + * @property {number} FILTER=3 FILTER value + * @property {number} MEASURE=4 MEASURE value + * @property {number} PARAMETER=5 PARAMETER value + */ + LookerColumnSpec.LookerColumnType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOOKER_COLUMN_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DIMENSION"] = 1; + values[valuesById[2] = "DIMENSION_GROUP"] = 2; + values[valuesById[3] = "FILTER"] = 3; + values[valuesById[4] = "MEASURE"] = 4; + values[valuesById[5] = "PARAMETER"] = 5; + return values; + })(); + + return LookerColumnSpec; + })(); + + ColumnSchema.FieldElementType = (function() { + + /** + * Properties of a FieldElementType. + * @memberof google.cloud.datacatalog.v1.ColumnSchema + * @interface IFieldElementType + * @property {string|null} [type] FieldElementType type + */ + + /** + * Constructs a new FieldElementType. + * @memberof google.cloud.datacatalog.v1.ColumnSchema + * @classdesc Represents a FieldElementType. + * @implements IFieldElementType + * @constructor + * @param {google.cloud.datacatalog.v1.ColumnSchema.IFieldElementType=} [properties] Properties to set + */ + function FieldElementType(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldElementType type. + * @member {string} type + * @memberof google.cloud.datacatalog.v1.ColumnSchema.FieldElementType + * @instance + */ + FieldElementType.prototype.type = ""; + + /** + * Creates a new FieldElementType instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.ColumnSchema.FieldElementType + * @static + * @param {google.cloud.datacatalog.v1.ColumnSchema.IFieldElementType=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.ColumnSchema.FieldElementType} FieldElementType instance + */ + FieldElementType.create = function create(properties) { + return new FieldElementType(properties); + }; + + /** + * Encodes the specified FieldElementType message. Does not implicitly {@link google.cloud.datacatalog.v1.ColumnSchema.FieldElementType.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.ColumnSchema.FieldElementType + * @static + * @param {google.cloud.datacatalog.v1.ColumnSchema.IFieldElementType} message FieldElementType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldElementType.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); + return writer; + }; + + /** + * Encodes the specified FieldElementType message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ColumnSchema.FieldElementType.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.ColumnSchema.FieldElementType + * @static + * @param {google.cloud.datacatalog.v1.ColumnSchema.IFieldElementType} message FieldElementType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldElementType.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldElementType message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.ColumnSchema.FieldElementType + * @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.FieldElementType} FieldElementType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldElementType.decode = function decode(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.FieldElementType(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldElementType message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.ColumnSchema.FieldElementType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.ColumnSchema.FieldElementType} FieldElementType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldElementType.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldElementType message. + * @function verify + * @memberof google.cloud.datacatalog.v1.ColumnSchema.FieldElementType + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldElementType.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"; + return null; + }; + + /** + * Creates a FieldElementType message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.ColumnSchema.FieldElementType + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.ColumnSchema.FieldElementType} FieldElementType + */ + FieldElementType.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.ColumnSchema.FieldElementType) + return object; + var message = new $root.google.cloud.datacatalog.v1.ColumnSchema.FieldElementType(); + if (object.type != null) + message.type = String(object.type); + return message; + }; + + /** + * Creates a plain object from a FieldElementType message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.ColumnSchema.FieldElementType + * @static + * @param {google.cloud.datacatalog.v1.ColumnSchema.FieldElementType} message FieldElementType + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldElementType.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.type = ""; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + return object; + }; + + /** + * Converts this FieldElementType to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.ColumnSchema.FieldElementType + * @instance + * @returns {Object.} JSON object + */ + FieldElementType.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldElementType + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.ColumnSchema.FieldElementType + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldElementType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.ColumnSchema.FieldElementType"; + }; + + return FieldElementType; + })(); + + 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: + case 6: + case 7: + case 8: + case 9: + case 10: + 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; + case "CLOUD_SPANNER": + case 6: + message.integratedSystem = 6; + break; + case "CLOUD_BIGTABLE": + case 7: + message.integratedSystem = 7; + break; + case "CLOUD_SQL": + case 8: + message.integratedSystem = 8; + break; + case "LOOKER": + case 9: + message.integratedSystem = 9; + break; + case "VERTEX_AI": + case 10: + message.integratedSystem = 10; + 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 + * @property {google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus|null} [dataplexTransferStatus] Tag dataplexTransferStatus + */ + + /** + * 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; + + /** + * Tag dataplexTransferStatus. + * @member {google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus} dataplexTransferStatus + * @memberof google.cloud.datacatalog.v1.Tag + * @instance + */ + Tag.prototype.dataplexTransferStatus = 0; + + // 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); + if (message.dataplexTransferStatus != null && Object.hasOwnProperty.call(message, "dataplexTransferStatus")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.dataplexTransferStatus); + 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; + } + case 7: { + message.dataplexTransferStatus = reader.int32(); + 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; + } + } + if (message.dataplexTransferStatus != null && message.hasOwnProperty("dataplexTransferStatus")) + switch (message.dataplexTransferStatus) { + default: + return "dataplexTransferStatus: enum value expected"; + case 0: + case 1: + case 2: + break; + } + 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]]); + } + } + switch (object.dataplexTransferStatus) { + default: + if (typeof object.dataplexTransferStatus === "number") { + message.dataplexTransferStatus = object.dataplexTransferStatus; + break; + } + break; + case "DATAPLEX_TRANSFER_STATUS_UNSPECIFIED": + case 0: + message.dataplexTransferStatus = 0; + break; + case "MIGRATED": + case 1: + message.dataplexTransferStatus = 1; + break; + case "TRANSFERRED": + case 2: + message.dataplexTransferStatus = 2; + break; + } + 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 = ""; + object.dataplexTransferStatus = options.enums === String ? "DATAPLEX_TRANSFER_STATUS_UNSPECIFIED" : 0; + } + 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; + if (message.dataplexTransferStatus != null && message.hasOwnProperty("dataplexTransferStatus")) + object.dataplexTransferStatus = options.enums === String ? $root.google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus[message.dataplexTransferStatus] === undefined ? message.dataplexTransferStatus : $root.google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus[message.dataplexTransferStatus] : message.dataplexTransferStatus; + 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 + * @property {google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus|null} [dataplexTransferStatus] TagTemplate dataplexTransferStatus + */ + + /** + * 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; + + /** + * TagTemplate dataplexTransferStatus. + * @member {google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus} dataplexTransferStatus + * @memberof google.cloud.datacatalog.v1.TagTemplate + * @instance + */ + TagTemplate.prototype.dataplexTransferStatus = 0; + + /** + * 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); + if (message.dataplexTransferStatus != null && Object.hasOwnProperty.call(message, "dataplexTransferStatus")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.dataplexTransferStatus); + 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; + } + case 7: { + message.dataplexTransferStatus = reader.int32(); + 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; + } + } + if (message.dataplexTransferStatus != null && message.hasOwnProperty("dataplexTransferStatus")) + switch (message.dataplexTransferStatus) { + default: + return "dataplexTransferStatus: enum value expected"; + case 0: + case 1: + case 2: + break; + } + 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]]); + } + } + switch (object.dataplexTransferStatus) { + default: + if (typeof object.dataplexTransferStatus === "number") { + message.dataplexTransferStatus = object.dataplexTransferStatus; + break; + } + break; + case "DATAPLEX_TRANSFER_STATUS_UNSPECIFIED": + case 0: + message.dataplexTransferStatus = 0; + break; + case "MIGRATED": + case 1: + message.dataplexTransferStatus = 1; + break; + case "TRANSFERRED": + case 2: + message.dataplexTransferStatus = 2; + break; + } + 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; + object.dataplexTransferStatus = options.enums === String ? "DATAPLEX_TRANSFER_STATUS_UNSPECIFIED" : 0; + } + 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; + if (message.dataplexTransferStatus != null && message.hasOwnProperty("dataplexTransferStatus")) + object.dataplexTransferStatus = options.enums === String ? $root.google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus[message.dataplexTransferStatus] === undefined ? message.dataplexTransferStatus : $root.google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus[message.dataplexTransferStatus] : message.dataplexTransferStatus; + 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"; + }; + + /** + * DataplexTransferStatus enum. + * @name google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus + * @enum {number} + * @property {number} DATAPLEX_TRANSFER_STATUS_UNSPECIFIED=0 DATAPLEX_TRANSFER_STATUS_UNSPECIFIED value + * @property {number} MIGRATED=1 MIGRATED value + * @property {number} TRANSFERRED=2 TRANSFERRED value + */ + TagTemplate.DataplexTransferStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATAPLEX_TRANSFER_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "MIGRATED"] = 1; + values[valuesById[2] = "TRANSFERRED"] = 2; + return values; + })(); + + 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.CommonUsageStats = (function() { + + /** + * Properties of a CommonUsageStats. + * @memberof google.cloud.datacatalog.v1 + * @interface ICommonUsageStats + * @property {number|Long|null} [viewCount] CommonUsageStats viewCount + */ + + /** + * Constructs a new CommonUsageStats. + * @memberof google.cloud.datacatalog.v1 + * @classdesc Represents a CommonUsageStats. + * @implements ICommonUsageStats + * @constructor + * @param {google.cloud.datacatalog.v1.ICommonUsageStats=} [properties] Properties to set + */ + function CommonUsageStats(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommonUsageStats viewCount. + * @member {number|Long|null|undefined} viewCount + * @memberof google.cloud.datacatalog.v1.CommonUsageStats + * @instance + */ + CommonUsageStats.prototype.viewCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CommonUsageStats _viewCount. + * @member {"viewCount"|undefined} _viewCount + * @memberof google.cloud.datacatalog.v1.CommonUsageStats + * @instance + */ + Object.defineProperty(CommonUsageStats.prototype, "_viewCount", { + get: $util.oneOfGetter($oneOfFields = ["viewCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CommonUsageStats instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.CommonUsageStats + * @static + * @param {google.cloud.datacatalog.v1.ICommonUsageStats=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.CommonUsageStats} CommonUsageStats instance + */ + CommonUsageStats.create = function create(properties) { + return new CommonUsageStats(properties); + }; + + /** + * Encodes the specified CommonUsageStats message. Does not implicitly {@link google.cloud.datacatalog.v1.CommonUsageStats.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.CommonUsageStats + * @static + * @param {google.cloud.datacatalog.v1.ICommonUsageStats} message CommonUsageStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonUsageStats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.viewCount != null && Object.hasOwnProperty.call(message, "viewCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.viewCount); + return writer; + }; + + /** + * Encodes the specified CommonUsageStats message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CommonUsageStats.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.CommonUsageStats + * @static + * @param {google.cloud.datacatalog.v1.ICommonUsageStats} message CommonUsageStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonUsageStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommonUsageStats message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.CommonUsageStats + * @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.CommonUsageStats} CommonUsageStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonUsageStats.decode = function decode(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.CommonUsageStats(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.viewCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommonUsageStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.CommonUsageStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.CommonUsageStats} CommonUsageStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonUsageStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonUsageStats message. + * @function verify + * @memberof google.cloud.datacatalog.v1.CommonUsageStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonUsageStats.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.viewCount != null && message.hasOwnProperty("viewCount")) { + properties._viewCount = 1; + if (!$util.isInteger(message.viewCount) && !(message.viewCount && $util.isInteger(message.viewCount.low) && $util.isInteger(message.viewCount.high))) + return "viewCount: integer|Long expected"; + } + return null; + }; + + /** + * Creates a CommonUsageStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.CommonUsageStats + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.CommonUsageStats} CommonUsageStats + */ + CommonUsageStats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.CommonUsageStats) + return object; + var message = new $root.google.cloud.datacatalog.v1.CommonUsageStats(); + if (object.viewCount != null) + if ($util.Long) + (message.viewCount = $util.Long.fromValue(object.viewCount)).unsigned = false; + else if (typeof object.viewCount === "string") + message.viewCount = parseInt(object.viewCount, 10); + else if (typeof object.viewCount === "number") + message.viewCount = object.viewCount; + else if (typeof object.viewCount === "object") + message.viewCount = new $util.LongBits(object.viewCount.low >>> 0, object.viewCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a CommonUsageStats message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.CommonUsageStats + * @static + * @param {google.cloud.datacatalog.v1.CommonUsageStats} message CommonUsageStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonUsageStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.viewCount != null && message.hasOwnProperty("viewCount")) { + if (typeof message.viewCount === "number") + object.viewCount = options.longs === String ? String(message.viewCount) : message.viewCount; + else + object.viewCount = options.longs === String ? $util.Long.prototype.toString.call(message.viewCount) : options.longs === Number ? new $util.LongBits(message.viewCount.low >>> 0, message.viewCount.high >>> 0).toNumber() : message.viewCount; + if (options.oneofs) + object._viewCount = "viewCount"; + } + return object; + }; + + /** + * Converts this CommonUsageStats to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.CommonUsageStats + * @instance + * @returns {Object.} JSON object + */ + CommonUsageStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonUsageStats + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.CommonUsageStats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonUsageStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.CommonUsageStats"; + }; + + return CommonUsageStats; + })(); + + 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 + * @property {Object.|null} [commonUsageWithinTimeRange] UsageSignal commonUsageWithinTimeRange + * @property {number|Long|null} [favoriteCount] UsageSignal favoriteCount + */ + + /** + * 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 = {}; + this.commonUsageWithinTimeRange = {}; + if (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; + + /** + * UsageSignal commonUsageWithinTimeRange. + * @member {Object.} commonUsageWithinTimeRange + * @memberof google.cloud.datacatalog.v1.UsageSignal + * @instance + */ + UsageSignal.prototype.commonUsageWithinTimeRange = $util.emptyObject; + + /** + * UsageSignal favoriteCount. + * @member {number|Long|null|undefined} favoriteCount + * @memberof google.cloud.datacatalog.v1.UsageSignal + * @instance + */ + UsageSignal.prototype.favoriteCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * UsageSignal _favoriteCount. + * @member {"favoriteCount"|undefined} _favoriteCount + * @memberof google.cloud.datacatalog.v1.UsageSignal + * @instance + */ + Object.defineProperty(UsageSignal.prototype, "_favoriteCount", { + get: $util.oneOfGetter($oneOfFields = ["favoriteCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * 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(); + } + if (message.commonUsageWithinTimeRange != null && Object.hasOwnProperty.call(message, "commonUsageWithinTimeRange")) + for (var keys = Object.keys(message.commonUsageWithinTimeRange), 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.CommonUsageStats.encode(message.commonUsageWithinTimeRange[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.favoriteCount != null && Object.hasOwnProperty.call(message, "favoriteCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.favoriteCount); + 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; + } + case 3: { + if (message.commonUsageWithinTimeRange === $util.emptyObject) + message.commonUsageWithinTimeRange = {}; + 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.CommonUsageStats.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.commonUsageWithinTimeRange[key] = value; + break; + } + case 4: { + message.favoriteCount = reader.int64(); + 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"; + var properties = {}; + 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; + } + } + if (message.commonUsageWithinTimeRange != null && message.hasOwnProperty("commonUsageWithinTimeRange")) { + if (!$util.isObject(message.commonUsageWithinTimeRange)) + return "commonUsageWithinTimeRange: object expected"; + var key = Object.keys(message.commonUsageWithinTimeRange); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.datacatalog.v1.CommonUsageStats.verify(message.commonUsageWithinTimeRange[key[i]]); + if (error) + return "commonUsageWithinTimeRange." + error; + } + } + if (message.favoriteCount != null && message.hasOwnProperty("favoriteCount")) { + properties._favoriteCount = 1; + if (!$util.isInteger(message.favoriteCount) && !(message.favoriteCount && $util.isInteger(message.favoriteCount.low) && $util.isInteger(message.favoriteCount.high))) + return "favoriteCount: integer|Long expected"; + } + 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]]); + } + } + if (object.commonUsageWithinTimeRange) { + if (typeof object.commonUsageWithinTimeRange !== "object") + throw TypeError(".google.cloud.datacatalog.v1.UsageSignal.commonUsageWithinTimeRange: object expected"); + message.commonUsageWithinTimeRange = {}; + for (var keys = Object.keys(object.commonUsageWithinTimeRange), i = 0; i < keys.length; ++i) { + if (typeof object.commonUsageWithinTimeRange[keys[i]] !== "object") + throw TypeError(".google.cloud.datacatalog.v1.UsageSignal.commonUsageWithinTimeRange: object expected"); + message.commonUsageWithinTimeRange[keys[i]] = $root.google.cloud.datacatalog.v1.CommonUsageStats.fromObject(object.commonUsageWithinTimeRange[keys[i]]); + } + } + if (object.favoriteCount != null) + if ($util.Long) + (message.favoriteCount = $util.Long.fromValue(object.favoriteCount)).unsigned = false; + else if (typeof object.favoriteCount === "string") + message.favoriteCount = parseInt(object.favoriteCount, 10); + else if (typeof object.favoriteCount === "number") + message.favoriteCount = object.favoriteCount; + else if (typeof object.favoriteCount === "object") + message.favoriteCount = new $util.LongBits(object.favoriteCount.low >>> 0, object.favoriteCount.high >>> 0).toNumber(); + 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 = {}; + object.commonUsageWithinTimeRange = {}; + } + 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); + } + if (message.commonUsageWithinTimeRange && (keys2 = Object.keys(message.commonUsageWithinTimeRange)).length) { + object.commonUsageWithinTimeRange = {}; + for (var j = 0; j < keys2.length; ++j) + object.commonUsageWithinTimeRange[keys2[j]] = $root.google.cloud.datacatalog.v1.CommonUsageStats.toObject(message.commonUsageWithinTimeRange[keys2[j]], options); + } + if (message.favoriteCount != null && message.hasOwnProperty("favoriteCount")) { + if (typeof message.favoriteCount === "number") + object.favoriteCount = options.longs === String ? String(message.favoriteCount) : message.favoriteCount; + else + object.favoriteCount = options.longs === String ? $util.Long.prototype.toString.call(message.favoriteCount) : options.longs === Number ? new $util.LongBits(message.favoriteCount.low >>> 0, message.favoriteCount.high >>> 0).toNumber() : message.favoriteCount; + if (options.oneofs) + object._favoriteCount = "favoriteCount"; + } + 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.TaggedEntry = (function() { + + /** + * Properties of a TaggedEntry. + * @memberof google.cloud.datacatalog.v1 + * @interface ITaggedEntry + * @property {google.cloud.datacatalog.v1.IEntry|null} [v1Entry] TaggedEntry v1Entry + * @property {Array.|null} [presentTags] TaggedEntry presentTags + * @property {Array.|null} [absentTags] TaggedEntry absentTags + */ + + /** + * Constructs a new TaggedEntry. + * @memberof google.cloud.datacatalog.v1 + * @classdesc Represents a TaggedEntry. + * @implements ITaggedEntry + * @constructor + * @param {google.cloud.datacatalog.v1.ITaggedEntry=} [properties] Properties to set + */ + function TaggedEntry(properties) { + this.presentTags = []; + this.absentTags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TaggedEntry v1Entry. + * @member {google.cloud.datacatalog.v1.IEntry|null|undefined} v1Entry + * @memberof google.cloud.datacatalog.v1.TaggedEntry + * @instance + */ + TaggedEntry.prototype.v1Entry = null; + + /** + * TaggedEntry presentTags. + * @member {Array.} presentTags + * @memberof google.cloud.datacatalog.v1.TaggedEntry + * @instance + */ + TaggedEntry.prototype.presentTags = $util.emptyArray; + + /** + * TaggedEntry absentTags. + * @member {Array.} absentTags + * @memberof google.cloud.datacatalog.v1.TaggedEntry + * @instance + */ + TaggedEntry.prototype.absentTags = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TaggedEntry entry. + * @member {"v1Entry"|undefined} entry + * @memberof google.cloud.datacatalog.v1.TaggedEntry + * @instance + */ + Object.defineProperty(TaggedEntry.prototype, "entry", { + get: $util.oneOfGetter($oneOfFields = ["v1Entry"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TaggedEntry instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.TaggedEntry + * @static + * @param {google.cloud.datacatalog.v1.ITaggedEntry=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.TaggedEntry} TaggedEntry instance + */ + TaggedEntry.create = function create(properties) { + return new TaggedEntry(properties); + }; + + /** + * Encodes the specified TaggedEntry message. Does not implicitly {@link google.cloud.datacatalog.v1.TaggedEntry.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.TaggedEntry + * @static + * @param {google.cloud.datacatalog.v1.ITaggedEntry} message TaggedEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TaggedEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.v1Entry != null && Object.hasOwnProperty.call(message, "v1Entry")) + $root.google.cloud.datacatalog.v1.Entry.encode(message.v1Entry, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.presentTags != null && message.presentTags.length) + for (var i = 0; i < message.presentTags.length; ++i) + $root.google.cloud.datacatalog.v1.Tag.encode(message.presentTags[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.absentTags != null && message.absentTags.length) + for (var i = 0; i < message.absentTags.length; ++i) + $root.google.cloud.datacatalog.v1.Tag.encode(message.absentTags[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TaggedEntry message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.TaggedEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.TaggedEntry + * @static + * @param {google.cloud.datacatalog.v1.ITaggedEntry} message TaggedEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TaggedEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TaggedEntry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.TaggedEntry + * @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.TaggedEntry} TaggedEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TaggedEntry.decode = function decode(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.TaggedEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.v1Entry = $root.google.cloud.datacatalog.v1.Entry.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.presentTags && message.presentTags.length)) + message.presentTags = []; + message.presentTags.push($root.google.cloud.datacatalog.v1.Tag.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.absentTags && message.absentTags.length)) + message.absentTags = []; + message.absentTags.push($root.google.cloud.datacatalog.v1.Tag.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TaggedEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.TaggedEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.TaggedEntry} TaggedEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TaggedEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TaggedEntry message. + * @function verify + * @memberof google.cloud.datacatalog.v1.TaggedEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TaggedEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.v1Entry != null && message.hasOwnProperty("v1Entry")) { + properties.entry = 1; + { + var error = $root.google.cloud.datacatalog.v1.Entry.verify(message.v1Entry); + if (error) + return "v1Entry." + error; + } + } + if (message.presentTags != null && message.hasOwnProperty("presentTags")) { + if (!Array.isArray(message.presentTags)) + return "presentTags: array expected"; + for (var i = 0; i < message.presentTags.length; ++i) { + var error = $root.google.cloud.datacatalog.v1.Tag.verify(message.presentTags[i]); + if (error) + return "presentTags." + error; + } + } + if (message.absentTags != null && message.hasOwnProperty("absentTags")) { + if (!Array.isArray(message.absentTags)) + return "absentTags: array expected"; + for (var i = 0; i < message.absentTags.length; ++i) { + var error = $root.google.cloud.datacatalog.v1.Tag.verify(message.absentTags[i]); + if (error) + return "absentTags." + error; + } + } + return null; + }; + + /** + * Creates a TaggedEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.TaggedEntry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.TaggedEntry} TaggedEntry + */ + TaggedEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.TaggedEntry) + return object; + var message = new $root.google.cloud.datacatalog.v1.TaggedEntry(); + if (object.v1Entry != null) { + if (typeof object.v1Entry !== "object") + throw TypeError(".google.cloud.datacatalog.v1.TaggedEntry.v1Entry: object expected"); + message.v1Entry = $root.google.cloud.datacatalog.v1.Entry.fromObject(object.v1Entry); + } + if (object.presentTags) { + if (!Array.isArray(object.presentTags)) + throw TypeError(".google.cloud.datacatalog.v1.TaggedEntry.presentTags: array expected"); + message.presentTags = []; + for (var i = 0; i < object.presentTags.length; ++i) { + if (typeof object.presentTags[i] !== "object") + throw TypeError(".google.cloud.datacatalog.v1.TaggedEntry.presentTags: object expected"); + message.presentTags[i] = $root.google.cloud.datacatalog.v1.Tag.fromObject(object.presentTags[i]); + } + } + if (object.absentTags) { + if (!Array.isArray(object.absentTags)) + throw TypeError(".google.cloud.datacatalog.v1.TaggedEntry.absentTags: array expected"); + message.absentTags = []; + for (var i = 0; i < object.absentTags.length; ++i) { + if (typeof object.absentTags[i] !== "object") + throw TypeError(".google.cloud.datacatalog.v1.TaggedEntry.absentTags: object expected"); + message.absentTags[i] = $root.google.cloud.datacatalog.v1.Tag.fromObject(object.absentTags[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TaggedEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.TaggedEntry + * @static + * @param {google.cloud.datacatalog.v1.TaggedEntry} message TaggedEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TaggedEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.presentTags = []; + object.absentTags = []; + } + if (message.v1Entry != null && message.hasOwnProperty("v1Entry")) { + object.v1Entry = $root.google.cloud.datacatalog.v1.Entry.toObject(message.v1Entry, options); + if (options.oneofs) + object.entry = "v1Entry"; + } + if (message.presentTags && message.presentTags.length) { + object.presentTags = []; + for (var j = 0; j < message.presentTags.length; ++j) + object.presentTags[j] = $root.google.cloud.datacatalog.v1.Tag.toObject(message.presentTags[j], options); + } + if (message.absentTags && message.absentTags.length) { + object.absentTags = []; + for (var j = 0; j < message.absentTags.length; ++j) + object.absentTags[j] = $root.google.cloud.datacatalog.v1.Tag.toObject(message.absentTags[j], options); + } + return object; + }; + + /** + * Converts this TaggedEntry to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.TaggedEntry + * @instance + * @returns {Object.} JSON object + */ + TaggedEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TaggedEntry + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.TaggedEntry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TaggedEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.TaggedEntry"; + }; + + return TaggedEntry; + })(); + + v1.DumpItem = (function() { + + /** + * Properties of a DumpItem. + * @memberof google.cloud.datacatalog.v1 + * @interface IDumpItem + * @property {google.cloud.datacatalog.v1.ITaggedEntry|null} [taggedEntry] DumpItem taggedEntry + */ + + /** + * Constructs a new DumpItem. + * @memberof google.cloud.datacatalog.v1 + * @classdesc Represents a DumpItem. + * @implements IDumpItem + * @constructor + * @param {google.cloud.datacatalog.v1.IDumpItem=} [properties] Properties to set + */ + function DumpItem(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DumpItem taggedEntry. + * @member {google.cloud.datacatalog.v1.ITaggedEntry|null|undefined} taggedEntry + * @memberof google.cloud.datacatalog.v1.DumpItem + * @instance + */ + DumpItem.prototype.taggedEntry = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DumpItem item. + * @member {"taggedEntry"|undefined} item + * @memberof google.cloud.datacatalog.v1.DumpItem + * @instance + */ + Object.defineProperty(DumpItem.prototype, "item", { + get: $util.oneOfGetter($oneOfFields = ["taggedEntry"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DumpItem instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.DumpItem + * @static + * @param {google.cloud.datacatalog.v1.IDumpItem=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.DumpItem} DumpItem instance + */ + DumpItem.create = function create(properties) { + return new DumpItem(properties); + }; + + /** + * Encodes the specified DumpItem message. Does not implicitly {@link google.cloud.datacatalog.v1.DumpItem.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.DumpItem + * @static + * @param {google.cloud.datacatalog.v1.IDumpItem} message DumpItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DumpItem.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.taggedEntry != null && Object.hasOwnProperty.call(message, "taggedEntry")) + $root.google.cloud.datacatalog.v1.TaggedEntry.encode(message.taggedEntry, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DumpItem message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DumpItem.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.DumpItem + * @static + * @param {google.cloud.datacatalog.v1.IDumpItem} message DumpItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DumpItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DumpItem message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.DumpItem + * @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.DumpItem} DumpItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DumpItem.decode = function decode(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.DumpItem(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.taggedEntry = $root.google.cloud.datacatalog.v1.TaggedEntry.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DumpItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.DumpItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.DumpItem} DumpItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DumpItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DumpItem message. + * @function verify + * @memberof google.cloud.datacatalog.v1.DumpItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DumpItem.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.taggedEntry != null && message.hasOwnProperty("taggedEntry")) { + properties.item = 1; + { + var error = $root.google.cloud.datacatalog.v1.TaggedEntry.verify(message.taggedEntry); + if (error) + return "taggedEntry." + error; + } + } + return null; + }; + + /** + * Creates a DumpItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.DumpItem + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.DumpItem} DumpItem + */ + DumpItem.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.DumpItem) + return object; + var message = new $root.google.cloud.datacatalog.v1.DumpItem(); + if (object.taggedEntry != null) { + if (typeof object.taggedEntry !== "object") + throw TypeError(".google.cloud.datacatalog.v1.DumpItem.taggedEntry: object expected"); + message.taggedEntry = $root.google.cloud.datacatalog.v1.TaggedEntry.fromObject(object.taggedEntry); + } + return message; + }; + + /** + * Creates a plain object from a DumpItem message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.DumpItem + * @static + * @param {google.cloud.datacatalog.v1.DumpItem} message DumpItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DumpItem.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.taggedEntry != null && message.hasOwnProperty("taggedEntry")) { + object.taggedEntry = $root.google.cloud.datacatalog.v1.TaggedEntry.toObject(message.taggedEntry, options); + if (options.oneofs) + object.item = "taggedEntry"; + } + return object; + }; + + /** + * Converts this DumpItem to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.DumpItem + * @instance + * @returns {Object.} JSON object + */ + DumpItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DumpItem + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.DumpItem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DumpItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.DumpItem"; + }; + + return DumpItem; + })(); + + 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 + * @property {google.cloud.datacatalog.v1.Taxonomy.IService|null} [service] Taxonomy service + */ + + /** + * 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; + + /** + * Taxonomy service. + * @member {google.cloud.datacatalog.v1.Taxonomy.IService|null|undefined} service + * @memberof google.cloud.datacatalog.v1.Taxonomy + * @instance + */ + Taxonomy.prototype.service = null; + + /** + * 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(); + } + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + $root.google.cloud.datacatalog.v1.Taxonomy.Service.encode(message.service, writer.uint32(/* id 7, wireType 2 =*/58).fork()).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; + } + case 7: { + message.service = $root.google.cloud.datacatalog.v1.Taxonomy.Service.decode(reader, reader.uint32()); + 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; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + var error = $root.google.cloud.datacatalog.v1.Taxonomy.Service.verify(message.service); + if (error) + return "service." + error; + } + 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; + } + } + if (object.service != null) { + if (typeof object.service !== "object") + throw TypeError(".google.cloud.datacatalog.v1.Taxonomy.service: object expected"); + message.service = $root.google.cloud.datacatalog.v1.Taxonomy.Service.fromObject(object.service); + } + 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; + object.service = 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]; + } + if (message.service != null && message.hasOwnProperty("service")) + object.service = $root.google.cloud.datacatalog.v1.Taxonomy.Service.toObject(message.service, options); + 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; + })(); + + Taxonomy.Service = (function() { + + /** + * Properties of a Service. + * @memberof google.cloud.datacatalog.v1.Taxonomy + * @interface IService + * @property {google.cloud.datacatalog.v1.ManagingSystem|null} [name] Service name + * @property {string|null} [identity] Service identity + */ + + /** + * Constructs a new Service. + * @memberof google.cloud.datacatalog.v1.Taxonomy + * @classdesc Represents a Service. + * @implements IService + * @constructor + * @param {google.cloud.datacatalog.v1.Taxonomy.IService=} [properties] Properties to set + */ + function Service(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Service name. + * @member {google.cloud.datacatalog.v1.ManagingSystem} name + * @memberof google.cloud.datacatalog.v1.Taxonomy.Service + * @instance + */ + Service.prototype.name = 0; + + /** + * Service identity. + * @member {string} identity + * @memberof google.cloud.datacatalog.v1.Taxonomy.Service + * @instance + */ + Service.prototype.identity = ""; + + /** + * Creates a new Service instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1.Taxonomy.Service + * @static + * @param {google.cloud.datacatalog.v1.Taxonomy.IService=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1.Taxonomy.Service} Service instance + */ + Service.create = function create(properties) { + return new Service(properties); + }; + + /** + * Encodes the specified Service message. Does not implicitly {@link google.cloud.datacatalog.v1.Taxonomy.Service.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1.Taxonomy.Service + * @static + * @param {google.cloud.datacatalog.v1.Taxonomy.IService} message Service message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Service.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.name); + if (message.identity != null && Object.hasOwnProperty.call(message, "identity")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.identity); + return writer; + }; + + /** + * Encodes the specified Service message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.Taxonomy.Service.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1.Taxonomy.Service + * @static + * @param {google.cloud.datacatalog.v1.Taxonomy.IService} message Service message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Service.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Service message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1.Taxonomy.Service + * @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.Service} Service + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Service.decode = function decode(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.Service(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.int32(); + break; + } + case 2: { + message.identity = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Service message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1.Taxonomy.Service + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1.Taxonomy.Service} Service + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Service.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Service message. + * @function verify + * @memberof google.cloud.datacatalog.v1.Taxonomy.Service + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Service.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + switch (message.name) { + default: + return "name: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.identity != null && message.hasOwnProperty("identity")) + if (!$util.isString(message.identity)) + return "identity: string expected"; + return null; + }; + + /** + * Creates a Service message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1.Taxonomy.Service + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1.Taxonomy.Service} Service + */ + Service.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1.Taxonomy.Service) + return object; + var message = new $root.google.cloud.datacatalog.v1.Taxonomy.Service(); + switch (object.name) { + default: + if (typeof object.name === "number") { + message.name = object.name; + break; + } + break; + case "MANAGING_SYSTEM_UNSPECIFIED": + case 0: + message.name = 0; + break; + case "MANAGING_SYSTEM_DATAPLEX": + case 1: + message.name = 1; + break; + case "MANAGING_SYSTEM_OTHER": + case 2: + message.name = 2; + break; + } + if (object.identity != null) + message.identity = String(object.identity); + return message; + }; + + /** + * Creates a plain object from a Service message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1.Taxonomy.Service + * @static + * @param {google.cloud.datacatalog.v1.Taxonomy.Service} message Service + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Service.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = options.enums === String ? "MANAGING_SYSTEM_UNSPECIFIED" : 0; + object.identity = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = options.enums === String ? $root.google.cloud.datacatalog.v1.ManagingSystem[message.name] === undefined ? message.name : $root.google.cloud.datacatalog.v1.ManagingSystem[message.name] : message.name; + if (message.identity != null && message.hasOwnProperty("identity")) + object.identity = message.identity; + return object; + }; + + /** + * Converts this Service to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1.Taxonomy.Service + * @instance + * @returns {Object.} JSON object + */ + Service.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Service + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1.Taxonomy.Service + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Service.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1.Taxonomy.Service"; + }; + + return Service; + })(); + + 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 + * @property {string|null} [filter] ListTaxonomiesRequest filter + */ + + /** + * 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 = ""; + + /** + * ListTaxonomiesRequest filter. + * @member {string} filter + * @memberof google.cloud.datacatalog.v1.ListTaxonomiesRequest + * @instance + */ + ListTaxonomiesRequest.prototype.filter = ""; + + /** + * 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); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + 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; + } + case 4: { + message.filter = 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"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: 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); + if (object.filter != null) + message.filter = String(object.filter); + 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 = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this 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; + })(); + + 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 + * @property {number} IDENTIFIER=8 IDENTIFIER value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + api.CommonLanguageSettings = (function() { + + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + */ + + /** + * Constructs a new CommonLanguageSettings. + * @memberof google.api + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings + * @constructor + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + */ + function CommonLanguageSettings(properties) { + this.destinations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.referenceDocsUri = ""; + + /** + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.destinations = $util.emptyArray; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @function create + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + */ + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); + }; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.referenceDocsUri = reader.string(); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonLanguageSettings message. + * @function verify + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonLanguageSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; + } + } + return null; + }; + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + */ + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) + return object; + var message = new $root.google.api.CommonLanguageSettings(); + if (object.referenceDocsUri != null) + message.referenceDocsUri = String(object.referenceDocsUri); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonLanguageSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) + object.referenceDocsUri = ""; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + } + return object; + }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; + + return CommonLanguageSettings; + })(); + + api.ClientLibrarySettings = (function() { + + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; + + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri + */ + + /** + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing + * @constructor + * @param {google.api.IPublishing=} [properties] Properties to set + */ + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.methodSettings = $util.emptyArray; + + /** + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; + + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; + + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; + + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; + + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; + + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; + + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; + + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + + /** + * Publishing restReferenceDocumentationUri. + * @member {string} restReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.restReferenceDocumentationUri = ""; + + /** + * Creates a new Publishing instance using the specified properties. + * @function create + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance + */ + Publishing.create = function create(properties) { + return new Publishing(properties); + }; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encode + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); + return writer; + }; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } + case 111: { + message.restReferenceDocumentationUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (!$util.isString(message.restReferenceDocumentationUri)) + return "restReferenceDocumentationUri: string expected"; + return null; + }; + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Publishing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Publishing} Publishing + */ + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) + return object; + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + if (object.restReferenceDocumentationUri != null) + message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); + return message; + }; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Publishing + * @static + * @param {google.api.Publishing} message Publishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; + object.restReferenceDocumentationUri = ""; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; + return object; + }; + + /** + * Converts this Publishing to JSON. + * @function toJSON + * @memberof google.api.Publishing + * @instance + * @returns {Object.} JSON object + */ + Publishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publishing + * @function getTypeUrl + * @memberof google.api.Publishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Publishing"; + }; + + return Publishing; + })(); + + api.JavaSettings = (function() { + + /** + * Properties of a JavaSettings. + * @memberof google.api + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + */ + + /** + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings + * @constructor + * @param {google.api.IJavaSettings=} [properties] Properties to set + */ + function JavaSettings(properties) { + this.serviceClassNames = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + */ + + /** + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings + * @constructor + * @param {google.api.IPythonSettings=} [properties] Properties to set + */ + function PythonSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; + + /** + * Creates a new PythonSettings instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance + */ + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSettings message. + * @function verify + * @memberof google.api.PythonSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings} PythonSettings + */ + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) + return object; + var message = new $root.google.api.PythonSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PythonSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings + * @static + * @param {google.api.PythonSettings} message PythonSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PythonSettings to JSON. + * @function toJSON + * @memberof google.api.PythonSettings + * @instance + * @returns {Object.} JSON object + */ + PythonSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSettings + * @function getTypeUrl + * @memberof google.api.PythonSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings"; + }; + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures + */ + + /** + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings + * @constructor + * @param {google.api.IDotnetSettings=} [properties] Properties to set + */ + function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; + + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; + + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; + + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @function create + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance + */ + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); + }; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encode + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) + for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); + if (message.ignoredResources != null && message.ignoredResources.length) + for (var i = 0; i < message.ignoredResources.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); + if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); + if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); + return writer; + }; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedServices[key] = value; + break; + } + case 3: { + if (message.renamedResources === $util.emptyObject) + message.renamedResources = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedResources[key] = value; + break; + } + case 4: { + if (!(message.ignoredResources && message.ignoredResources.length)) + message.ignoredResources = []; + message.ignoredResources.push(reader.string()); + break; + } + case 5: { + if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) + message.forcedNamespaceAliases = []; + message.forcedNamespaceAliases.push(reader.string()); + break; + } + case 6: { + if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) + message.handwrittenSignatures = []; + message.handwrittenSignatures.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { + if (!$util.isObject(message.renamedResources)) + return "renamedResources: object expected"; + var key = Object.keys(message.renamedResources); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedResources[key[i]])) + return "renamedResources: string{k:string} expected"; + } + if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { + if (!Array.isArray(message.ignoredResources)) + return "ignoredResources: array expected"; + for (var i = 0; i < message.ignoredResources.length; ++i) + if (!$util.isString(message.ignoredResources[i])) + return "ignoredResources: string[] expected"; + } + if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { + if (!Array.isArray(message.forcedNamespaceAliases)) + return "forcedNamespaceAliases: array expected"; + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + if (!$util.isString(message.forcedNamespaceAliases[i])) + return "forcedNamespaceAliases: string[] expected"; + } + if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { + if (!Array.isArray(message.handwrittenSignatures)) + return "handwrittenSignatures: array expected"; + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + if (!$util.isString(message.handwrittenSignatures[i])) + return "handwrittenSignatures: string[] expected"; + } + return null; + }; + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.DotnetSettings} DotnetSettings + */ + DotnetSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } + return message; + }; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.DotnetSettings} message DotnetSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DotnetSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } + return object; + }; + + /** + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings + * @instance + * @returns {Object.} JSON object + */ + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DotnetSettings + * @function getTypeUrl + * @memberof google.api.DotnetSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; + + return DotnetSettings; + })(); + + api.RubySettings = (function() { + + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ + + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + */ + + /** + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set + */ + function GoSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; + + /** + * Creates a new GoSettings instance using the specified properties. + * @function create + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance + */ + GoSettings.create = function create(properties) { + return new GoSettings(properties); + }; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encode + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoSettings message. + * @function verify + * @memberof google.api.GoSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.GoSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.GoSettings} GoSettings + */ + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) + return object; + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.GoSettings + * @static + * @param {google.api.GoSettings} message GoSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields + */ + + /** + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings + * @constructor + * @param {google.api.IMethodSettings=} [properties] Properties to set + */ + function MethodSettings(properties) { + this.autoPopulatedFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.selector = ""; + + /** + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.longRunning = null; + + /** + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance + */ + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); + }; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); + return writer; + }; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { + if (!Array.isArray(message.autoPopulatedFields)) + return "autoPopulatedFields: array expected"; + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + if (!$util.isString(message.autoPopulatedFields[i])) + return "autoPopulatedFields: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings} MethodSettings + */ + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) + return object; + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + if (object.autoPopulatedFields) { + if (!Array.isArray(object.autoPopulatedFields)) + throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); + message.autoPopulatedFields = []; + for (var i = 0; i < object.autoPopulatedFields.length; ++i) + message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings + * @static + * @param {google.api.MethodSettings} message MethodSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + if (message.autoPopulatedFields && message.autoPopulatedFields.length) { + object.autoPopulatedFields = []; + for (var j = 0; j < message.autoPopulatedFields.length; ++j) + object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; + } + return object; + }; + + /** + * Converts this MethodSettings to JSON. + * @function toJSON + * @memberof google.api.MethodSettings + * @instance + * @returns {Object.} JSON object + */ + MethodSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodSettings + * @function getTypeUrl + * @memberof google.api.MethodSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings"; + }; + + MethodSettings.LongRunning = (function() { + + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ + + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + * @property {number} SHOPPING=5 SHOPPING value + * @property {number} GEO=6 GEO value + * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value + */ + api.ClientLibraryOrganization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD"] = 1; + values[valuesById[2] = "ADS"] = 2; + values[valuesById[3] = "PHOTOS"] = 3; + values[valuesById[4] = "STREET_VIEW"] = 4; + values[valuesById[5] = "SHOPPING"] = 5; + values[valuesById[6] = "GEO"] = 6; + values[valuesById[7] = "GENERATIVE_AI"] = 7; + return values; + })(); + + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + api.ClientLibraryDestination = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; + values[valuesById[10] = "GITHUB"] = 10; + values[valuesById[20] = "PACKAGE_MANAGER"] = 20; + return values; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value + * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value + * @property {number} EDITION_2023=1000 EDITION_2023 value + * @property {number} EDITION_2024=1001 EDITION_2024 value + * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value + * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value + * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value + * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value + * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value + * @property {number} EDITION_MAX=2147483647 EDITION_MAX value + */ + protobuf.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[998] = "EDITION_PROTO2"] = 998; + values[valuesById[999] = "EDITION_PROTO3"] = 999; + values[valuesById[1000] = "EDITION_2023"] = 1000; + values[valuesById[1001] = "EDITION_2024"] = 1001; + values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; + values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; + values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; + values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; + values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; + values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; + return values; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = 0; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 14: { + message.edition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + this.declaration = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 3: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); + if (message.editionDefaults != null && message.editionDefaults.length) + for (var i = 0; i < message.editionDefaults.length; ++i) + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targets = []; + object.editionDefaults = []; + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.features = null; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; + } + if (message.editionDefaults && message.editionDefaults.length) { + object.editionDefaults = []; + for (var j = 0; j < message.editionDefaults.length; ++j) + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + + FieldOptions.EditionDefault = (function() { + + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ + + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + */ + EditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + return object; + var message = new $root.google.protobuf.FieldOptions.EditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this EditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + * @returns {Object.} JSON object + */ + EditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + }; + + return EditionDefault; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.features = null; + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.features = null; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * EnumOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.features = null; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.features = null; + + /** + * EnumValueOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.debugRedact = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.debugRedact = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object.debugRedact = false; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.features = null; + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * ServiceOptions .google.api.apiVersion. + * @member {string} .google.api.apiVersion + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.apiVersion"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + case 525000001: { + message[".google.api.apiVersion"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (!$util.isString(message[".google.api.apiVersion"])) + return ".google.api.apiVersion: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + if (object[".google.api.apiVersion"] != null) + message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + object[".google.api.apiVersion"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.features = null; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 35: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + case 1049: { + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object.features = null; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.FeatureSet = (function() { + + /** + * Properties of a FeatureSet. + * @memberof google.protobuf + * @interface IFeatureSet + * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence + * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType + * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding + * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation + * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding + * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat + */ + + /** + * Constructs a new FeatureSet. + * @memberof google.protobuf + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet + * @constructor + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + */ + function FeatureSet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.fieldPresence = 0; + + /** + * FeatureSet enumType. + * @member {google.protobuf.FeatureSet.EnumType} enumType + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enumType = 0; + + /** + * FeatureSet repeatedFieldEncoding. + * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.repeatedFieldEncoding = 0; + + /** + * FeatureSet utf8Validation. + * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.utf8Validation = 0; + + /** + * FeatureSet messageEncoding. + * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.messageEncoding = 0; + + /** + * FeatureSet jsonFormat. + * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.jsonFormat = 0; + + /** + * Creates a new FeatureSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance + */ + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); + }; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); + return writer; + }; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fieldPresence = reader.int32(); + break; + } + case 2: { + message.enumType = reader.int32(); + break; + } + case 3: { + message.repeatedFieldEncoding = reader.int32(); + break; + } + case 4: { + message.utf8Validation = reader.int32(); + break; + } + case 5: { + message.messageEncoding = reader.int32(); + break; + } + case 6: { + message.jsonFormat = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSet message. + * @function verify + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + switch (message.fieldPresence) { + default: + return "fieldPresence: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enumType != null && message.hasOwnProperty("enumType")) + switch (message.enumType) { + default: + return "enumType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + switch (message.repeatedFieldEncoding) { + default: + return "repeatedFieldEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + switch (message.utf8Validation) { + default: + return "utf8Validation: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + switch (message.messageEncoding) { + default: + return "messageEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + switch (message.jsonFormat) { + default: + return "jsonFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet} FeatureSet + */ + FeatureSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet) + return object; + var message = new $root.google.protobuf.FeatureSet(); + switch (object.fieldPresence) { + default: + if (typeof object.fieldPresence === "number") { + message.fieldPresence = object.fieldPresence; + break; + } + break; + case "FIELD_PRESENCE_UNKNOWN": + case 0: + message.fieldPresence = 0; + break; + case "EXPLICIT": + case 1: + message.fieldPresence = 1; + break; + case "IMPLICIT": + case 2: + message.fieldPresence = 2; + break; + case "LEGACY_REQUIRED": + case 3: + message.fieldPresence = 3; + break; + } + switch (object.enumType) { + default: + if (typeof object.enumType === "number") { + message.enumType = object.enumType; + break; + } + break; + case "ENUM_TYPE_UNKNOWN": + case 0: + message.enumType = 0; + break; + case "OPEN": + case 1: + message.enumType = 1; + break; + case "CLOSED": + case 2: + message.enumType = 2; + break; + } + switch (object.repeatedFieldEncoding) { + default: + if (typeof object.repeatedFieldEncoding === "number") { + message.repeatedFieldEncoding = object.repeatedFieldEncoding; + break; + } + break; + case "REPEATED_FIELD_ENCODING_UNKNOWN": + case 0: + message.repeatedFieldEncoding = 0; + break; + case "PACKED": + case 1: + message.repeatedFieldEncoding = 1; + break; + case "EXPANDED": + case 2: + message.repeatedFieldEncoding = 2; + break; + } + switch (object.utf8Validation) { + default: + if (typeof object.utf8Validation === "number") { + message.utf8Validation = object.utf8Validation; + break; + } + break; + case "UTF8_VALIDATION_UNKNOWN": + case 0: + message.utf8Validation = 0; + break; + case "VERIFY": + case 2: + message.utf8Validation = 2; + break; + case "NONE": + case 3: + message.utf8Validation = 3; + break; + } + switch (object.messageEncoding) { + default: + if (typeof object.messageEncoding === "number") { + message.messageEncoding = object.messageEncoding; + break; + } + break; + case "MESSAGE_ENCODING_UNKNOWN": + case 0: + message.messageEncoding = 0; + break; + case "LENGTH_PREFIXED": + case 1: + message.messageEncoding = 1; + break; + case "DELIMITED": + case 2: + message.messageEncoding = 2; + break; + } + switch (object.jsonFormat) { + default: + if (typeof object.jsonFormat === "number") { + message.jsonFormat = object.jsonFormat; + break; + } + break; + case "JSON_FORMAT_UNKNOWN": + case 0: + message.jsonFormat = 0; + break; + case "ALLOW": + case 1: + message.jsonFormat = 1; + break; + case "LEGACY_BEST_EFFORT": + case 2: + message.jsonFormat = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.FeatureSet} message FeatureSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; + object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; + object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; + object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; + object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; + object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; + } + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; + if (message.enumType != null && message.hasOwnProperty("enumType")) + object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; + return object; + }; + + /** + * Converts this FeatureSet to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet + * @instance + * @returns {Object.} JSON object + */ + FeatureSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSet + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet"; + }; + + /** + * FieldPresence enum. + * @name google.protobuf.FeatureSet.FieldPresence + * @enum {number} + * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value + * @property {number} EXPLICIT=1 EXPLICIT value + * @property {number} IMPLICIT=2 IMPLICIT value + * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value + */ + FeatureSet.FieldPresence = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; + values[valuesById[1] = "EXPLICIT"] = 1; + values[valuesById[2] = "IMPLICIT"] = 2; + values[valuesById[3] = "LEGACY_REQUIRED"] = 3; + return values; + })(); + + /** + * EnumType enum. + * @name google.protobuf.FeatureSet.EnumType + * @enum {number} + * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value + * @property {number} OPEN=1 OPEN value + * @property {number} CLOSED=2 CLOSED value + */ + FeatureSet.EnumType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "OPEN"] = 1; + values[valuesById[2] = "CLOSED"] = 2; + return values; + })(); + + /** + * RepeatedFieldEncoding enum. + * @name google.protobuf.FeatureSet.RepeatedFieldEncoding + * @enum {number} + * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value + * @property {number} PACKED=1 PACKED value + * @property {number} EXPANDED=2 EXPANDED value + */ + FeatureSet.RepeatedFieldEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "PACKED"] = 1; + values[valuesById[2] = "EXPANDED"] = 2; + return values; + })(); + + /** + * Utf8Validation enum. + * @name google.protobuf.FeatureSet.Utf8Validation + * @enum {number} + * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value + * @property {number} VERIFY=2 VERIFY value + * @property {number} NONE=3 NONE value + */ + FeatureSet.Utf8Validation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; + values[valuesById[2] = "VERIFY"] = 2; + values[valuesById[3] = "NONE"] = 3; + return values; + })(); + + /** + * MessageEncoding enum. + * @name google.protobuf.FeatureSet.MessageEncoding + * @enum {number} + * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value + * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value + * @property {number} DELIMITED=2 DELIMITED value + */ + FeatureSet.MessageEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "LENGTH_PREFIXED"] = 1; + values[valuesById[2] = "DELIMITED"] = 2; + return values; + })(); + + /** + * JsonFormat enum. + * @name google.protobuf.FeatureSet.JsonFormat + * @enum {number} + * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value + * @property {number} ALLOW=1 ALLOW value + * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value + */ + FeatureSet.JsonFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; + values[valuesById[1] = "ALLOW"] = 1; + values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; + return values; + })(); + + return FeatureSet; + })(); + + protobuf.FeatureSetDefaults = (function() { + + /** + * Properties of a FeatureSetDefaults. + * @memberof google.protobuf + * @interface IFeatureSetDefaults + * @property {Array.|null} [defaults] FeatureSetDefaults defaults + * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition + * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition + */ + + /** + * Constructs a new FeatureSetDefaults. + * @memberof google.protobuf + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults + * @constructor + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + */ + function FeatureSetDefaults(properties) { + this.defaults = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.defaults = $util.emptyArray; + + /** + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.minimumEdition = 0; + + /** + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.maximumEdition = 0; + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + */ + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); + }; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaults != null && message.defaults.length) + for (var i = 0; i < message.defaults.length; ++i) + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); + return writer; + }; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetDefaults message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (!Array.isArray(message.defaults)) + return "defaults: array expected"; + for (var i = 0; i < message.defaults.length; ++i) { + var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); + if (error) + return "defaults." + error; + } + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + switch (message.maximumEdition) { + default: + return "maximumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + */ + FeatureSetDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults(); + if (object.defaults) { + if (!Array.isArray(object.defaults)) + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); + message.defaults = []; + for (var i = 0; i < object.defaults.length; ++i) { + if (typeof object.defaults[i] !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); + message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); + } + } + switch (object.minimumEdition) { + default: + if (typeof object.minimumEdition === "number") { + message.minimumEdition = object.minimumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.minimumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.minimumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.minimumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.minimumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.minimumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.minimumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.minimumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.minimumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.minimumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.minimumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.minimumEdition = 2147483647; + break; + } + switch (object.maximumEdition) { + default: + if (typeof object.maximumEdition === "number") { + message.maximumEdition = object.maximumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.maximumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.maximumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.maximumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.maximumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.maximumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.maximumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.maximumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.maximumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.maximumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.maximumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.maximumEdition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.defaults = []; + if (options.defaults) { + object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.defaults && message.defaults.length) { + object.defaults = []; + for (var j = 0; j < message.defaults.length; ++j) + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; + return object; + }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults + * @instance + * @returns {Object.} JSON object + */ + FeatureSetDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetDefaults + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; + }; + + FeatureSetDefaults.FeatureSetEditionDefault = (function() { + + /** + * Properties of a FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @interface IFeatureSetEditionDefault + * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition + * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + */ + + /** + * Constructs a new FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @classdesc Represents a FeatureSetEditionDefault. + * @implements IFeatureSetEditionDefault + * @constructor + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + */ + function FeatureSetEditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; + + /** + * FeatureSetEditionDefault features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.features = null; + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance + */ + FeatureSetEditionDefault.create = function create(properties) { + return new FeatureSetEditionDefault(properties); + }; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetEditionDefault message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetEditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + return null; + }; + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + */ + FeatureSetEditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetEditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.features = null; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + * @returns {Object.} JSON object + */ + FeatureSetEditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; + }; + + return FeatureSetEditionDefault; + })(); + + return FeatureSetDefaults; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.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.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + protobuf.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.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + + return Any; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + 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; + })(); + + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + + /** + * Constructs a new Operations service. + * @memberof google.longrunning + * @classdesc Represents an Operations + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Operations(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * Creates new Operations service using the specified rpc implementation. + * @function create + * @memberof google.longrunning.Operations + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. + */ + Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @memberof google.longrunning.Operations + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse + */ + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { + return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @memberof google.longrunning.Operations + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @memberof google.longrunning.Operations + * @typedef DeleteOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { + return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOperation" }); + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @memberof google.longrunning.Operations + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { + return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @memberof google.longrunning.Operations + * @typedef WaitOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { + return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "WaitOperation" }); + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Operations; + })(); + + longrunning.Operation = (function() { + + /** + * Properties of an Operation. + * @memberof google.longrunning + * @interface IOperation + * @property {string|null} [name] Operation name + * @property {google.protobuf.IAny|null} [metadata] Operation metadata + * @property {boolean|null} [done] Operation done + * @property {google.rpc.IStatus|null} [error] Operation error + * @property {google.protobuf.IAny|null} [response] Operation response + */ + + /** + * Constructs a new Operation. + * @memberof google.longrunning + * @classdesc Represents an Operation. + * @implements IOperation + * @constructor + * @param {google.longrunning.IOperation=} [properties] Properties to set + */ + function Operation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operation name. + * @member {string} name + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.name = ""; + + /** + * Operation metadata. + * @member {google.protobuf.IAny|null|undefined} metadata + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.metadata = null; + + /** + * Operation done. + * @member {boolean} done + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.done = false; + + /** + * Operation error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.error = null; + + /** + * Operation response. + * @member {google.protobuf.IAny|null|undefined} response + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.response = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Operation result. + * @member {"error"|"response"|undefined} result + * @memberof google.longrunning.Operation + * @instance + */ + Object.defineProperty(Operation.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["error", "response"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Operation instance using the specified properties. + * @function create + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation=} [properties] Properties to set + * @returns {google.longrunning.Operation} Operation instance + */ + Operation.create = function create(properties) { + return new Operation(properties); + }; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encode + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + case 3: { + message.done = reader.bool(); + break; + } + case 4: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operation message. + * @function verify + * @memberof google.longrunning.Operation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Any.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.done != null && message.hasOwnProperty("done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.error != null && message.hasOwnProperty("error")) { + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.response != null && message.hasOwnProperty("response")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Any.verify(message.response); + if (error) + return "response." + error; + } + } + return null; + }; + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.Operation + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.Operation} Operation + */ + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.Operation) + return object; + var message = new $root.google.longrunning.Operation(); + if (object.name != null) + message.name = String(object.name); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.longrunning.Operation.metadata: object expected"); + message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.longrunning.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.response != null) { + if (typeof object.response !== "object") + throw TypeError(".google.longrunning.Operation.response: object expected"); + message.response = $root.google.protobuf.Any.fromObject(object.response); + } + return message; + }; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.metadata = null; + object.done = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); + if (message.done != null && message.hasOwnProperty("done")) + object.done = message.done; + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + if (message.response != null && message.hasOwnProperty("response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options); + if (options.oneofs) + object.result = "response"; + } + return object; + }; + + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof google.longrunning.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof google.longrunning.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.Operation"; + }; + + return Operation; + })(); + + longrunning.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) + return object; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; + }; + + return GetOperationRequest; + })(); + + longrunning.ListOperationsRequest = (function() { + + /** + * Properties of a ListOperationsRequest. + * @memberof google.longrunning + * @interface IListOperationsRequest + * @property {string|null} [name] ListOperationsRequest name + * @property {string|null} [filter] ListOperationsRequest filter + * @property {number|null} [pageSize] ListOperationsRequest pageSize + * @property {string|null} [pageToken] ListOperationsRequest pageToken + */ + + /** + * Constructs a new ListOperationsRequest. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest + * @constructor + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + */ + function ListOperationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.name = ""; + + /** + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; + + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; + + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance + */ + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); + }; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsRequest message. + * @function verify + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + */ + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) + return object; + var message = new $root.google.longrunning.ListOperationsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this ListOperationsRequest to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsRequest + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; + }; + + return ListOperationsRequest; + })(); + + longrunning.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.longrunning.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + var message = new $root.google.longrunning.ListOperationsResponse(); + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.operations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + + return ListOperationsResponse; + })(); + + longrunning.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + */ + function CancelOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.name = ""; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance + */ + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); + }; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOperationRequest message. + * @function verify + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) + return object; + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + function DeleteOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + */ + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) + return object; + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.DeleteOperationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + }; + + return DeleteOperationRequest; + })(); + + longrunning.WaitOperationRequest = (function() { + + /** + * Properties of a WaitOperationRequest. + * @memberof google.longrunning + * @interface IWaitOperationRequest + * @property {string|null} [name] WaitOperationRequest name + * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout + */ + + /** + * Constructs a new WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + */ + function WaitOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.name = ""; + + /** + * WaitOperationRequest timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.timeout = null; + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + */ + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); + }; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaitOperationRequest message. + * @function verify + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WaitOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + return null; + }; + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + */ + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + var message = new $root.google.longrunning.WaitOperationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + return message; + }; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaitOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.timeout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + return object; + }; + + /** + * Converts this WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + + return WaitOperationRequest; + })(); + + longrunning.OperationInfo = (function() { + + /** + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType + */ + + /** + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo + * @constructor + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + */ + function OperationInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.responseType = ""; + + /** + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.metadataType = ""; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @function create + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance + */ + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); + }; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encode + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); + return writer; + }; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.responseType = reader.string(); + break; + } + case 2: { + message.metadataType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationInfo message. + * @function verify + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.responseType != null && message.hasOwnProperty("responseType")) + if (!$util.isString(message.responseType)) + return "responseType: string expected"; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (!$util.isString(message.metadataType)) + return "metadataType: string expected"; + return null; + }; + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.OperationInfo} OperationInfo + */ + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) + return object; + var message = new $root.google.longrunning.OperationInfo(); + if (object.responseType != null) + message.responseType = String(object.responseType); + if (object.metadataType != null) + message.metadataType = String(object.metadataType); + return message; + }; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.responseType = ""; + object.metadataType = ""; + } + if (message.responseType != null && message.hasOwnProperty("responseType")) + object.responseType = message.responseType; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + object.metadataType = message.metadataType; + return object; + }; + + /** + * Converts this OperationInfo to JSON. + * @function toJSON + * @memberof google.longrunning.OperationInfo + * @instance + * @returns {Object.} JSON object + */ + OperationInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + + return OperationInfo; + })(); + + return longrunning; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + + return Status; + })(); + + return rpc; + })(); + + return google; + })(); + + return $root; +}); diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/protos/protos.json b/owl-bot-staging/google-cloud-datacatalog/v1/protos/protos.json new file mode 100644 index 00000000000..35a1b61d011 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/protos/protos.json @@ -0,0 +1,6607 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "datacatalog": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.DataCatalog.V1", + "go_package": "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb", + "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, + "CLOUD_SPANNER": 6, + "CLOUD_BIGTABLE": 7, + "CLOUD_SQL": 8, + "LOOKER": 9, + "VERTEX_AI": 10 + } + }, + "ManagingSystem": { + "values": { + "MANAGING_SYSTEM_UNSPECIFIED": 0, + "MANAGING_SYSTEM_DATAPLEX": 1, + "MANAGING_SYSTEM_OTHER": 2 + } + }, + "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" + } + ] + }, + "ReconcileTags": { + "requestType": "ReconcileTagsRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags:reconcile", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "ReconcileTagsResponse", + "(google.longrunning.operation_info).metadata_type": "ReconcileTagsMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags:reconcile", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ReconcileTagsResponse", + "metadata_type": "ReconcileTagsMetadata" + } + } + ] + }, + "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": "*" + } + ] + } + } + ] + }, + "ImportEntries": { + "requestType": "ImportEntriesRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries:import", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "ImportEntriesResponse", + "(google.longrunning.operation_info).metadata_type": "ImportEntriesMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries:import", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ImportEntriesResponse", + "metadata_type": "ImportEntriesMetadata" + } + } + ] + }, + "SetConfig": { + "requestType": "SetConfigRequest", + "responseType": "MigrationConfig", + "options": { + "(google.api.http).post": "/v1/{name=organizations/*/locations/*}:setConfig", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{name=projects/*/locations/*}:setConfig", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=organizations/*/locations/*}:setConfig", + "body": "*", + "additional_bindings": { + "post": "/v1/{name=projects/*/locations/*}:setConfig", + "body": "*" + } + } + } + ] + }, + "RetrieveConfig": { + "requestType": "RetrieveConfigRequest", + "responseType": "OrganizationConfig", + "options": { + "(google.api.http).get": "/v1/{name=organizations/*/locations/*}:retrieveConfig" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=organizations/*/locations/*}:retrieveConfig" + } + } + ] + }, + "RetrieveEffectiveConfig": { + "requestType": "RetrieveEffectiveConfigRequest", + "responseType": "MigrationConfig", + "options": { + "(google.api.http).get": "/v1/{name=organizations/*/locations/*}:retrieveEffectiveConfig", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*}:retrieveEffectiveConfig" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=organizations/*/locations/*}:retrieveEffectiveConfig", + "additional_bindings": { + "get": "/v1/{name=projects/*/locations/*}:retrieveEffectiveConfig" + } + } + } + ] + } + } + }, + "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 + }, + "adminSearch": { + "type": "bool", + "id": 17, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "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 + }, + "totalSize": { + "type": "int32", + "id": 2 + }, + "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 + }, + "project": { + "type": "string", + "id": 6 + }, + "location": { + "type": "string", + "id": 7 + } + } + }, + "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" + ] + }, + "systemSpec": { + "oneof": [ + "sqlDatabaseSystemSpec", + "lookerSystemSpec", + "cloudBigtableSystemSpec" + ] + }, + "typeSpec": { + "oneof": [ + "gcsFilesetSpec", + "bigqueryTableSpec", + "bigqueryDateShardedSpec" + ] + }, + "spec": { + "oneof": [ + "databaseTableSpec", + "dataSourceConnectionSpec", + "routineSpec", + "datasetSpec", + "filesetSpec", + "serviceSpec", + "modelSpec", + "featureOnlineStoreSpec" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER", + "(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 + }, + "sqlDatabaseSystemSpec": { + "type": "SqlDatabaseSystemSpec", + "id": 39 + }, + "lookerSystemSpec": { + "type": "LookerSystemSpec", + "id": 40 + }, + "cloudBigtableSystemSpec": { + "type": "CloudBigtableSystemSpec", + "id": 41 + }, + "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 + }, + "datasetSpec": { + "type": "DatasetSpec", + "id": 32 + }, + "filesetSpec": { + "type": "FilesetSpec", + "id": 33 + }, + "serviceSpec": { + "type": "ServiceSpec", + "id": 42 + }, + "modelSpec": { + "type": "ModelSpec", + "id": 43 + }, + "featureOnlineStoreSpec": { + "type": "FeatureOnlineStoreSpec", + "id": 45 + }, + "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" + } + }, + "databaseViewSpec": { + "type": "DatabaseViewSpec", + "id": 3 + } + }, + "nested": { + "TableType": { + "values": { + "TABLE_TYPE_UNSPECIFIED": 0, + "NATIVE": 1, + "EXTERNAL": 2 + } + }, + "DatabaseViewSpec": { + "oneofs": { + "sourceDefinition": { + "oneof": [ + "baseTable", + "sqlQuery" + ] + } + }, + "fields": { + "viewType": { + "type": "ViewType", + "id": 1 + }, + "baseTable": { + "type": "string", + "id": 2 + }, + "sqlQuery": { + "type": "string", + "id": 3 + } + }, + "nested": { + "ViewType": { + "values": { + "VIEW_TYPE_UNSPECIFIED": 0, + "STANDARD_VIEW": 1, + "MATERIALIZED_VIEW": 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 + } + } + } + } + } + }, + "DatasetSpec": { + "oneofs": { + "systemSpec": { + "oneof": [ + "vertexDatasetSpec" + ] + } + }, + "fields": { + "vertexDatasetSpec": { + "type": "VertexDatasetSpec", + "id": 2 + } + } + }, + "SqlDatabaseSystemSpec": { + "fields": { + "sqlEngine": { + "type": "string", + "id": 1 + }, + "databaseVersion": { + "type": "string", + "id": 2 + }, + "instanceHost": { + "type": "string", + "id": 3 + } + } + }, + "LookerSystemSpec": { + "fields": { + "parentInstanceId": { + "type": "string", + "id": 1 + }, + "parentInstanceDisplayName": { + "type": "string", + "id": 2 + }, + "parentModelId": { + "type": "string", + "id": 3 + }, + "parentModelDisplayName": { + "type": "string", + "id": 4 + }, + "parentViewId": { + "type": "string", + "id": 5 + }, + "parentViewDisplayName": { + "type": "string", + "id": 6 + } + } + }, + "CloudBigtableSystemSpec": { + "fields": { + "instanceDisplayName": { + "type": "string", + "id": 1 + } + } + }, + "CloudBigtableInstanceSpec": { + "fields": { + "cloudBigtableClusterSpecs": { + "rule": "repeated", + "type": "CloudBigtableClusterSpec", + "id": 1 + } + }, + "nested": { + "CloudBigtableClusterSpec": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "location": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "linkedResource": { + "type": "string", + "id": 4 + } + } + } + } + }, + "ServiceSpec": { + "oneofs": { + "systemSpec": { + "oneof": [ + "cloudBigtableInstanceSpec" + ] + } + }, + "fields": { + "cloudBigtableInstanceSpec": { + "type": "CloudBigtableInstanceSpec", + "id": 1 + } + } + }, + "VertexModelSourceInfo": { + "fields": { + "sourceType": { + "type": "ModelSourceType", + "id": 1 + }, + "copy": { + "type": "bool", + "id": 2 + } + }, + "nested": { + "ModelSourceType": { + "values": { + "MODEL_SOURCE_TYPE_UNSPECIFIED": 0, + "AUTOML": 1, + "CUSTOM": 2, + "BQML": 3, + "MODEL_GARDEN": 4, + "GENIE": 5, + "CUSTOM_TEXT_EMBEDDING": 6, + "MARKETPLACE": 7 + } + } + } + }, + "VertexModelSpec": { + "fields": { + "versionId": { + "type": "string", + "id": 1 + }, + "versionAliases": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "versionDescription": { + "type": "string", + "id": 3 + }, + "vertexModelSourceInfo": { + "type": "VertexModelSourceInfo", + "id": 4 + }, + "containerImageUri": { + "type": "string", + "id": 5 + } + } + }, + "VertexDatasetSpec": { + "fields": { + "dataItemCount": { + "type": "int64", + "id": 1 + }, + "dataType": { + "type": "DataType", + "id": 2 + } + }, + "nested": { + "DataType": { + "values": { + "DATA_TYPE_UNSPECIFIED": 0, + "TABLE": 1, + "IMAGE": 2, + "TEXT": 3, + "VIDEO": 4, + "CONVERSATION": 5, + "TIME_SERIES": 6, + "DOCUMENT": 7, + "TEXT_TO_SPEECH": 8, + "TRANSLATION": 9, + "STORE_VISION": 10, + "ENTERPRISE_KNOWLEDGE_GRAPH": 11, + "TEXT_PROMPT": 12 + } + } + } + }, + "ModelSpec": { + "oneofs": { + "systemSpec": { + "oneof": [ + "vertexModelSpec" + ] + } + }, + "fields": { + "vertexModelSpec": { + "type": "VertexModelSpec", + "id": 1 + } + } + }, + "FeatureOnlineStoreSpec": { + "fields": { + "storageType": { + "type": "StorageType", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "StorageType": { + "values": { + "STORAGE_TYPE_UNSPECIFIED": 0, + "BIGTABLE": 1, + "OPTIMIZED": 2 + } + } + } + }, + "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, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "displayName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "dataCatalogTimestamps": { + "type": "SystemTimestamps", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "transferredToDataplex": { + "type": "bool", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "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 + } + } + }, + "ReconcileTagsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datacatalog.googleapis.com/Entry" + } + }, + "tagTemplate": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datacatalog.googleapis.com/TagTemplate" + } + }, + "forceDeleteMissing": { + "type": "bool", + "id": 3 + }, + "tags": { + "rule": "repeated", + "type": "Tag", + "id": 4 + } + } + }, + "ReconcileTagsResponse": { + "fields": { + "createdTagsCount": { + "type": "int64", + "id": 1 + }, + "updatedTagsCount": { + "type": "int64", + "id": 2 + }, + "deletedTagsCount": { + "type": "int64", + "id": 3 + } + } + }, + "ReconcileTagsMetadata": { + "fields": { + "state": { + "type": "ReconciliationState", + "id": 1 + }, + "errors": { + "keyType": "string", + "type": "google.rpc.Status", + "id": 2 + } + }, + "nested": { + "ReconciliationState": { + "values": { + "RECONCILIATION_STATE_UNSPECIFIED": 0, + "RECONCILIATION_QUEUED": 1, + "RECONCILIATION_IN_PROGRESS": 2, + "RECONCILIATION_DONE": 3 + } + } + } + }, + "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": {} + }, + "ImportEntriesRequest": { + "oneofs": { + "source": { + "oneof": [ + "gcsBucketPath" + ] + } + }, + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/Entry" + } + }, + "gcsBucketPath": { + "type": "string", + "id": 2 + }, + "jobId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ImportEntriesResponse": { + "oneofs": { + "_upsertedEntriesCount": { + "oneof": [ + "upsertedEntriesCount" + ] + }, + "_deletedEntriesCount": { + "oneof": [ + "deletedEntriesCount" + ] + } + }, + "fields": { + "upsertedEntriesCount": { + "type": "int64", + "id": 5, + "options": { + "proto3_optional": true + } + }, + "deletedEntriesCount": { + "type": "int64", + "id": 6, + "options": { + "proto3_optional": true + } + } + } + }, + "ImportEntriesMetadata": { + "fields": { + "state": { + "type": "ImportState", + "id": 1 + }, + "errors": { + "rule": "repeated", + "type": "google.rpc.Status", + "id": 2 + } + }, + "nested": { + "ImportState": { + "values": { + "IMPORT_STATE_UNSPECIFIED": 0, + "IMPORT_QUEUED": 1, + "IMPORT_IN_PROGRESS": 2, + "IMPORT_DONE": 3, + "IMPORT_OBSOLETE": 4 + } + } + } + }, + "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, + "DATABASE_SCHEMA": 15, + "DASHBOARD": 16, + "EXPLORE": 17, + "LOOK": 18, + "FEATURE_ONLINE_STORE": 19, + "FEATURE_VIEW": 20, + "FEATURE_GROUP": 21 + } + }, + "SetConfigRequest": { + "oneofs": { + "configuration": { + "oneof": [ + "tagTemplateMigration", + "catalogUiExperience" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "tagTemplateMigration": { + "type": "TagTemplateMigration", + "id": 2 + }, + "catalogUiExperience": { + "type": "CatalogUIExperience", + "id": 3 + } + } + }, + "RetrieveConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "RetrieveEffectiveConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "TagTemplateMigration": { + "values": { + "TAG_TEMPLATE_MIGRATION_UNSPECIFIED": 0, + "TAG_TEMPLATE_MIGRATION_ENABLED": 1, + "TAG_TEMPLATE_MIGRATION_DISABLED": 2 + } + }, + "CatalogUIExperience": { + "values": { + "CATALOG_UI_EXPERIENCE_UNSPECIFIED": 0, + "CATALOG_UI_EXPERIENCE_ENABLED": 1, + "CATALOG_UI_EXPERIENCE_DISABLED": 2 + } + }, + "OrganizationConfig": { + "fields": { + "config": { + "keyType": "string", + "type": "MigrationConfig", + "id": 1 + } + } + }, + "MigrationConfig": { + "fields": { + "tagTemplateMigration": { + "type": "TagTemplateMigration", + "id": 1 + }, + "catalogUiExperience": { + "type": "CatalogUIExperience", + "id": 2 + } + } + }, + "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": { + "oneofs": { + "systemSpec": { + "oneof": [ + "lookerColumnSpec" + ] + } + }, + "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" + } + }, + "defaultValue": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "ordinalPosition": { + "type": "int32", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "highestIndexingType": { + "type": "IndexingType", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "subcolumns": { + "rule": "repeated", + "type": "ColumnSchema", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "lookerColumnSpec": { + "type": "LookerColumnSpec", + "id": 18 + }, + "rangeElementType": { + "type": "FieldElementType", + "id": 19, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "gcRule": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "IndexingType": { + "values": { + "INDEXING_TYPE_UNSPECIFIED": 0, + "INDEXING_TYPE_NONE": 1, + "INDEXING_TYPE_NON_UNIQUE": 2, + "INDEXING_TYPE_UNIQUE": 3, + "INDEXING_TYPE_PRIMARY_KEY": 4 + } + }, + "LookerColumnSpec": { + "fields": { + "type": { + "type": "LookerColumnType", + "id": 1 + } + }, + "nested": { + "LookerColumnType": { + "values": { + "LOOKER_COLUMN_TYPE_UNSPECIFIED": 0, + "DIMENSION": 1, + "DIMENSION_GROUP": 2, + "FILTER": 3, + "MEASURE": 4, + "PARAMETER": 5 + } + } + } + }, + "FieldElementType": { + "fields": { + "type": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "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, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "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" + } + }, + "dataplexTransferStatus": { + "type": "TagTemplate.DataplexTransferStatus", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "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, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "displayName": { + "type": "string", + "id": 2 + }, + "isPubliclyReadable": { + "type": "bool", + "id": 5 + }, + "fields": { + "keyType": "string", + "type": "TagTemplateField", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dataplexTransferStatus": { + "type": "DataplexTransferStatus", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "DataplexTransferStatus": { + "valuesOptions": { + "MIGRATED": { + "deprecated": true + } + }, + "values": { + "DATAPLEX_TRANSFER_STATUS_UNSPECIFIED": 0, + "MIGRATED": 1, + "TRANSFERRED": 2 + } + } + } + }, + "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)": "IDENTIFIER" + } + }, + "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 + } + } + }, + "CommonUsageStats": { + "oneofs": { + "_viewCount": { + "oneof": [ + "viewCount" + ] + } + }, + "fields": { + "viewCount": { + "type": "int64", + "id": 1, + "options": { + "proto3_optional": true + } + } + } + }, + "UsageSignal": { + "oneofs": { + "_favoriteCount": { + "oneof": [ + "favoriteCount" + ] + } + }, + "fields": { + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "usageWithinTimeRange": { + "keyType": "string", + "type": "UsageStats", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "commonUsageWithinTimeRange": { + "keyType": "string", + "type": "CommonUsageStats", + "id": 3 + }, + "favoriteCount": { + "type": "int64", + "id": 4, + "options": { + "proto3_optional": true + } + } + } + }, + "TaggedEntry": { + "oneofs": { + "entry": { + "oneof": [ + "v1Entry" + ] + } + }, + "fields": { + "v1Entry": { + "type": "Entry", + "id": 1 + }, + "presentTags": { + "rule": "repeated", + "type": "Tag", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "absentTags": { + "rule": "repeated", + "type": "Tag", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DumpItem": { + "oneofs": { + "item": { + "oneof": [ + "taggedEntry" + ] + } + }, + "fields": { + "taggedEntry": { + "type": "TaggedEntry", + "id": 1 + } + } + }, + "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)": "IDENTIFIER" + } + }, + "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" + } + }, + "service": { + "type": "Service", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "PolicyType": { + "values": { + "POLICY_TYPE_UNSPECIFIED": 0, + "FINE_GRAINED_ACCESS_CONTROL": 1 + } + }, + "Service": { + "fields": { + "name": { + "type": "ManagingSystem", + "id": 1 + }, + "identity": { + "type": "string", + "id": 2 + } + } + } + } + }, + "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)": "IDENTIFIER" + } + }, + "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 + }, + "filter": { + "type": "string", + "id": 4 + } + } + }, + "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 + } + } + } + } + } + } + } + } + }, + "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", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "apiVersion": { + "type": "string", + "id": 525000001, + "extend": "google.protobuf.ServiceOptions" + }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 + }, + "restReferenceDocumentationUri": { + "type": "string", + "id": 111 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "renamedResources": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "ignoredResources": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "forcedNamespaceAliases": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "handwrittenSignatures": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + }, + "autoPopulatedFields": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "LongRunning": { + "fields": { + "initialPollDelay": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "pollDelayMultiplier": { + "type": "float", + "id": 2 + }, + "maxPollDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "totalPollTimeout": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + } + } + }, + "ClientLibraryOrganization": { + "values": { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4, + "SHOPPING": 5, + "GEO": 6, + "GENERATIVE_AI": 7 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "Edition": { + "values": { + "EDITION_UNKNOWN": 0, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_2024": 1001, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + "EDITION_MAX": 2147483647 + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "declaration": { + "rule": "repeated", + "type": "Declaration", + "id": 2, + "options": { + "retention": "RETENTION_SOURCE" + } + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "verification": { + "type": "VerificationState", + "id": 3, + "options": { + "default": "UNVERIFIED", + "retention": "RETENTION_SOURCE" + } + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "Declaration": { + "fields": { + "number": { + "type": "int32", + "id": 1 + }, + "fullName": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "reserved": { + "type": "bool", + "id": 5 + }, + "repeated": { + "type": "bool", + "id": 6 + } + }, + "reserved": [ + [ + 4, + 4 + ] + ] + }, + "VerificationState": { + "values": { + "DECLARATION": 0, + "UNVERIFIED": 1 + } + } + } + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REPEATED": 3, + "LABEL_REQUIRED": 2 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 42, + 42 + ], + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 12 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "targets": { + "rule": "repeated", + "type": "OptionTargetType", + "id": 19, + "options": { + "packed": false + } + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 18, + 18 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + }, + "OptionRetention": { + "values": { + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2 + } + }, + "OptionTargetType": { + "values": { + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9 + } + }, + "EditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "value": { + "type": "string", + "id": 2 + } + } + } + } + }, + "OneofOptions": { + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "features": { + "type": "FeatureSet", + "id": 34 + }, + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "features": { + "type": "FeatureSet", + "id": 35 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "FeatureSet": { + "fields": { + "fieldPresence": { + "type": "FieldPresence", + "id": 1, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_2023", + "edition_defaults.value": "EXPLICIT" + } + }, + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "OPEN" + } + }, + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "PACKED" + } + }, + "utf8Validation": { + "type": "Utf8Validation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" + } + }, + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO2", + "edition_defaults.value": "LENGTH_PREFIXED" + } + }, + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "ALLOW" + } + } + }, + "extensions": [ + [ + 1000, + 1000 + ], + [ + 1001, + 1001 + ], + [ + 1002, + 1002 + ], + [ + 9990, + 9990 + ], + [ + 9995, + 9999 + ], + [ + 10000, + 10000 + ] + ], + "reserved": [ + [ + 999, + 999 + ] + ], + "nested": { + "FieldPresence": { + "values": { + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3 + } + }, + "EnumType": { + "values": { + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2 + } + }, + "RepeatedFieldEncoding": { + "values": { + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2 + } + }, + "Utf8Validation": { + "values": { + "UTF8_VALIDATION_UNKNOWN": 0, + "VERIFY": 2, + "NONE": 3 + } + }, + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } + }, + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } + } + } + }, + "FeatureSetDefaults": { + "fields": { + "defaults": { + "rule": "repeated", + "type": "FeatureSetEditionDefault", + "id": 1 + }, + "minimumEdition": { + "type": "Edition", + "id": 4 + }, + "maximumEdition": { + "type": "Edition", + "id": 5 + } + }, + "nested": { + "FeatureSetEditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "features": { + "type": "FeatureSet", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + } + } + }, + "iam": { + "nested": { + "v1": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.Cloud.Iam.V1", + "go_package": "cloud.google.com/go/iam/apiv1/iampb;iampb", + "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 + } + } + } + } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "cloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb", + "java_multiple_files": true, + "java_outer_classname": "OperationsProto", + "java_package": "com.google.longrunning", + "php_namespace": "Google\\LongRunning" + }, + "nested": { + "operationInfo": { + "type": "google.longrunning.OperationInfo", + "id": 1049, + "extend": "google.protobuf.MethodOptions" + }, + "Operations": { + "options": { + "(google.api.default_host)": "longrunning.googleapis.com" + }, + "methods": { + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{name=operations}", + "(google.api.method_signature)": "name,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteOperation": { + "requestType": "DeleteOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=operations/**}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "WaitOperation": { + "requestType": "WaitOperationRequest", + "responseType": "Operation" + } + } + }, + "Operation": { + "oneofs": { + "result": { + "oneof": [ + "error", + "response" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metadata": { + "type": "google.protobuf.Any", + "id": 2 + }, + "done": { + "type": "bool", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + }, + "response": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "GetOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListOperationsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "WaitOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "OperationInfo": { + "fields": { + "responseType": { + "type": "string", + "id": 1 + }, + "metadataType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_entry.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_entry.js new file mode 100644 index 00000000000..4dec286ef3d --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_entry.js @@ -0,0 +1,76 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_entry_group.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_entry_group.js new file mode 100644 index 00000000000..b1909bf3acc --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_entry_group.js @@ -0,0 +1,76 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_tag.js new file mode 100644 index 00000000000..dda7adab166 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_tag.js @@ -0,0 +1,70 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_tag_template.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_tag_template.js new file mode 100644 index 00000000000..d1750ae9608 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_tag_template.js @@ -0,0 +1,75 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_tag_template_field.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_tag_template_field.js new file mode 100644 index 00000000000..c4b8a1568c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_tag_template_field.js @@ -0,0 +1,77 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_entry.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_entry.js new file mode 100644 index 00000000000..3e6123e8d84 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_entry.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_entry_group.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_entry_group.js new file mode 100644 index 00000000000..6cedee23bf1 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_entry_group.js @@ -0,0 +1,65 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_tag.js new file mode 100644 index 00000000000..f600946c02d --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_tag.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_tag_template.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_tag_template.js new file mode 100644 index 00000000000..e581d2690f5 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_tag_template.js @@ -0,0 +1,67 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_tag_template_field.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_tag_template_field.js new file mode 100644 index 00000000000..93c07061724 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_tag_template_field.js @@ -0,0 +1,67 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_entry.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_entry.js new file mode 100644 index 00000000000..2e796a4120a --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_entry.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_entry_group.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_entry_group.js new file mode 100644 index 00000000000..464ac1b5d01 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_entry_group.js @@ -0,0 +1,65 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_iam_policy.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_iam_policy.js new file mode 100644 index 00000000000..d22ebd2d441 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_iam_policy.js @@ -0,0 +1,67 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_tag_template.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_tag_template.js new file mode 100644 index 00000000000..9f02313f823 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_tag_template.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.import_entries.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.import_entries.js new file mode 100644 index 00000000000..cd37504e57e --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.import_entries.js @@ -0,0 +1,71 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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_ImportEntries_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Target entry group for ingested entries. + */ + // const parent = 'abc123' + /** + * Path to a Cloud Storage bucket that contains a dump ready for ingestion. + */ + // const gcsBucketPath = 'abc123' + /** + * Optional. (Optional) Dataplex task job id, if specified will be used as + * part of ImportEntries LRO ID + */ + // const jobId = 'abc123' + + // Imports the Datacatalog library + const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; + + // Instantiates a client + const datacatalogClient = new DataCatalogClient(); + + async function callImportEntries() { + // Construct request + const request = { + parent, + }; + + // Run request + const [operation] = await datacatalogClient.importEntries(request); + const [response] = await operation.promise(); + console.log(response); + } + + callImportEntries(); + // [END datacatalog_v1_generated_DataCatalog_ImportEntries_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.list_entries.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.list_entries.js new file mode 100644 index 00000000000..6c448c00a31 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.list_entries.js @@ -0,0 +1,81 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 = 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.list_entry_groups.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.list_entry_groups.js new file mode 100644 index 00000000000..aef01a89525 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.list_entry_groups.js @@ -0,0 +1,75 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 = 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.list_tags.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.list_tags.js new file mode 100644 index 00000000000..d2a6dae4fb6 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.list_tags.js @@ -0,0 +1,75 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 = 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.lookup_entry.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.lookup_entry.js new file mode 100644 index 00000000000..9223e4dd7e8 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.lookup_entry.js @@ -0,0 +1,103 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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) (https://cloud.google.com//data-catalog/docs/fully-qualified-names) + * 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' + /** + * Project where the lookup should be performed. Required to lookup + * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` + * using its `fully_qualified_name`. Ignored in other cases. + */ + // const project = 'my-project' + /** + * Location where the lookup should be performed. Required to lookup + * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` + * using its `fully_qualified_name`. Ignored in other cases. + */ + // const location = '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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.modify_entry_contacts.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.modify_entry_contacts.js new file mode 100644 index 00000000000..6e231d42ebb --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.modify_entry_contacts.js @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.modify_entry_overview.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.modify_entry_overview.js new file mode 100644 index 00000000000..d3f6bbe8032 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.modify_entry_overview.js @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.reconcile_tags.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.reconcile_tags.js new file mode 100644 index 00000000000..eafaca6a135 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.reconcile_tags.js @@ -0,0 +1,80 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, tagTemplate) { + // [START datacatalog_v1_generated_DataCatalog_ReconcileTags_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of Entry google.cloud.datacatalog.v1.Entry to be tagged. + */ + // const parent = 'abc123' + /** + * Required. The name of the tag template, which is used for reconciliation. + */ + // const tagTemplate = 'abc123' + /** + * If set to `true`, deletes entry tags related to a tag template + * not listed in the tags source from an entry. If set to `false`, + * unlisted tags are retained. + */ + // const forceDeleteMissing = true + /** + * A list of tags to apply to an entry. A tag can specify a + * tag template, which must be the template specified in the + * `ReconcileTagsRequest`. + * The sole entry and each of its columns must be mentioned at most once. + */ + // const tags = [1,2,3,4] + + // Imports the Datacatalog library + const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; + + // Instantiates a client + const datacatalogClient = new DataCatalogClient(); + + async function callReconcileTags() { + // Construct request + const request = { + parent, + tagTemplate, + }; + + // Run request + const [operation] = await datacatalogClient.reconcileTags(request); + const [response] = await operation.promise(); + console.log(response); + } + + callReconcileTags(); + // [END datacatalog_v1_generated_DataCatalog_ReconcileTags_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.rename_tag_template_field.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.rename_tag_template_field.js new file mode 100644 index 00000000000..5ee973520ab --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.rename_tag_template_field.js @@ -0,0 +1,67 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.rename_tag_template_field_enum_value.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.rename_tag_template_field_enum_value.js new file mode 100644 index 00000000000..bd10fb422f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.rename_tag_template_field_enum_value.js @@ -0,0 +1,67 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.retrieve_config.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.retrieve_config.js new file mode 100644 index 00000000000..8e1535ef179 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.retrieve_config.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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_RetrieveConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 organization whose config is being retrieved. + */ + // const name = 'abc123' + + // Imports the Datacatalog library + const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; + + // Instantiates a client + const datacatalogClient = new DataCatalogClient(); + + async function callRetrieveConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await datacatalogClient.retrieveConfig(request); + console.log(response); + } + + callRetrieveConfig(); + // [END datacatalog_v1_generated_DataCatalog_RetrieveConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.retrieve_effective_config.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.retrieve_effective_config.js new file mode 100644 index 00000000000..8481756c5ff --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.retrieve_effective_config.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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_RetrieveEffectiveConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 whose effective config is being retrieved. + */ + // const name = 'abc123' + + // Imports the Datacatalog library + const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; + + // Instantiates a client + const datacatalogClient = new DataCatalogClient(); + + async function callRetrieveEffectiveConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await datacatalogClient.retrieveEffectiveConfig(request); + console.log(response); + } + + callRetrieveEffectiveConfig(); + // [END datacatalog_v1_generated_DataCatalog_RetrieveEffectiveConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.search_catalog.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.search_catalog.js new file mode 100644 index 00000000000..5cec31e396e --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.search_catalog.js @@ -0,0 +1,118 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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' + /** + * Upper bound on the number of results you can get in a single response. + * 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 + * 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. + * If you are experiencing recall issues and you don't have to fetch the + * results in any specific order, consider setting this parameter to + * `default`. + * If this parameter is omitted, it defaults to the descending `relevance`. + */ + // const orderBy = 'abc123' + /** + * Optional. If set, use searchAll permission granted on organizations from + * `include_org_ids` and projects from `include_project_ids` instead of the + * fine grained per resource permissions when filtering the search results. + * The only allowed `order_by` criteria for admin_search mode is `default`. + * Using this flags guarantees a full recall of the search results. + */ + // const adminSearch = true + + // 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 = 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.set_config.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.set_config.js new file mode 100644 index 00000000000..c7d5d77dc07 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.set_config.js @@ -0,0 +1,69 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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_SetConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 organization or project whose config is being specified. + */ + // const name = 'abc123' + /** + * Opt-in status for the migration of Tag Templates to Dataplex. + */ + // const tagTemplateMigration = {} + /** + * Opt-in status for the UI switch to Dataplex. + */ + // const catalogUiExperience = {} + + // Imports the Datacatalog library + const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; + + // Instantiates a client + const datacatalogClient = new DataCatalogClient(); + + async function callSetConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await datacatalogClient.setConfig(request); + console.log(response); + } + + callSetConfig(); + // [END datacatalog_v1_generated_DataCatalog_SetConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.set_iam_policy.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.set_iam_policy.js new file mode 100644 index 00000000000..ecb39caf993 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.set_iam_policy.js @@ -0,0 +1,77 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.star_entry.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.star_entry.js new file mode 100644 index 00000000000..b5a973b7e18 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.star_entry.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.test_iam_permissions.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.test_iam_permissions.js new file mode 100644 index 00000000000..c9460c31f5c --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.test_iam_permissions.js @@ -0,0 +1,70 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 = ['abc','def'] + + // 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.unstar_entry.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.unstar_entry.js new file mode 100644 index 00000000000..bd31f3611d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.unstar_entry.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_entry.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_entry.js new file mode 100644 index 00000000000..26ad8f60266 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_entry.js @@ -0,0 +1,85 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_entry_group.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_entry_group.js new file mode 100644 index 00000000000..3d8bc9eaa84 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_entry_group.js @@ -0,0 +1,68 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_tag.js new file mode 100644 index 00000000000..a429ca6fe49 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_tag.js @@ -0,0 +1,69 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_tag_template.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_tag_template.js new file mode 100644 index 00000000000..0b1ccc785d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_tag_template.js @@ -0,0 +1,71 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_tag_template_field.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_tag_template_field.js new file mode 100644 index 00000000000..b9e18256601 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_tag_template_field.js @@ -0,0 +1,82 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.create_policy_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.create_policy_tag.js new file mode 100644 index 00000000000..7006cd16c8b --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.create_policy_tag.js @@ -0,0 +1,65 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.create_taxonomy.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.create_taxonomy.js new file mode 100644 index 00000000000..2329f33b645 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.create_taxonomy.js @@ -0,0 +1,65 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.delete_policy_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.delete_policy_tag.js new file mode 100644 index 00000000000..c1b2b208653 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.delete_policy_tag.js @@ -0,0 +1,62 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.delete_taxonomy.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.delete_taxonomy.js new file mode 100644 index 00000000000..77940dcba83 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.delete_taxonomy.js @@ -0,0 +1,62 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.get_iam_policy.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.get_iam_policy.js new file mode 100644 index 00000000000..4c270dc80ae --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.get_iam_policy.js @@ -0,0 +1,67 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.get_policy_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.get_policy_tag.js new file mode 100644 index 00000000000..ac6b9d5ef71 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.get_policy_tag.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.get_taxonomy.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.get_taxonomy.js new file mode 100644 index 00000000000..7ff0a3a8f21 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.get_taxonomy.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.list_policy_tags.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.list_policy_tags.js new file mode 100644 index 00000000000..2bf0a7cc4e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.list_policy_tags.js @@ -0,0 +1,75 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 = 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.list_taxonomies.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.list_taxonomies.js new file mode 100644 index 00000000000..4ca5ec8f119 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.list_taxonomies.js @@ -0,0 +1,79 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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' + /** + * Supported field for filter is 'service' and value is 'dataplex'. + * Eg: service=dataplex. + */ + // const filter = '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 = 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.set_iam_policy.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.set_iam_policy.js new file mode 100644 index 00000000000..8599b15230c --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.set_iam_policy.js @@ -0,0 +1,77 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.test_iam_permissions.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.test_iam_permissions.js new file mode 100644 index 00000000000..742b043644d --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.test_iam_permissions.js @@ -0,0 +1,70 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 = ['abc','def'] + + // 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.update_policy_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.update_policy_tag.js new file mode 100644 index 00000000000..aa10b6bceed --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.update_policy_tag.js @@ -0,0 +1,69 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.update_taxonomy.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.update_taxonomy.js new file mode 100644 index 00000000000..5c64aa74a0b --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.update_taxonomy.js @@ -0,0 +1,68 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager_serialization.export_taxonomies.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager_serialization.export_taxonomies.js new file mode 100644 index 00000000000..146fdfa4543 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager_serialization.export_taxonomies.js @@ -0,0 +1,72 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 = ['abc','def'] + /** + * 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager_serialization.import_taxonomies.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager_serialization.import_taxonomies.js new file mode 100644 index 00000000000..2811178851c --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager_serialization.import_taxonomies.js @@ -0,0 +1,70 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager_serialization.replace_taxonomy.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager_serialization.replace_taxonomy.js new file mode 100644 index 00000000000..19e3b2566f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager_serialization.replace_taxonomy.js @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.v1.json b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.v1.json new file mode 100644 index 00000000000..b896bb69f03 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.v1.json @@ -0,0 +1,2407 @@ +{ + "clientLibrary": { + "name": "nodejs-datacatalog", + "version": "0.1.0", + "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": 110, + "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" + }, + { + "name": "admin_search", + "type": "TYPE_BOOL" + } + ], + "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": 68, + "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": 95, + "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" + }, + { + "name": "project", + "type": "TYPE_STRING" + }, + { + "name": "location", + "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": 59, + "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": 59, + "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_ReconcileTags_async", + "title": "DataCatalog reconcileTags Sample", + "origin": "API_DEFINITION", + "description": " `ReconcileTags` creates or updates a list of tags on the entry. If the [ReconcileTagsRequest.force_delete_missing][google.cloud.datacatalog.v1.ReconcileTagsRequest.force_delete_missing] parameter is set, the operation deletes tags not included in the input tag list. `ReconcileTags` returns a [long-running operation] [google.longrunning.Operation] resource that can be queried with [Operations.GetOperation][google.longrunning.Operations.GetOperation] to return [ReconcileTagsMetadata] [google.cloud.datacatalog.v1.ReconcileTagsMetadata] and a [ReconcileTagsResponse] [google.cloud.datacatalog.v1.ReconcileTagsResponse] message.", + "canonical": true, + "file": "data_catalog.reconcile_tags.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ReconcileTags", + "fullName": "google.cloud.datacatalog.v1.DataCatalog.ReconcileTags", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "tag_template", + "type": "TYPE_STRING" + }, + { + "name": "force_delete_missing", + "type": "TYPE_BOOL" + }, + { + "name": "tags", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataCatalogClient", + "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" + }, + "method": { + "shortName": "ReconcileTags", + "fullName": "google.cloud.datacatalog.v1.DataCatalog.ReconcileTags", + "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_DataCatalog_ImportEntries_async", + "title": "DataCatalog importEntries Sample", + "origin": "API_DEFINITION", + "description": " Imports entries from a source, such as data previously dumped into a Cloud Storage bucket, into Data Catalog. Import of entries is a sync operation that reconciles the state of the third-party system with the Data Catalog. `ImportEntries` accepts source data snapshots of a third-party system. Snapshot should be delivered as a .wire or base65-encoded .txt file containing a sequence of Protocol Buffer messages of [DumpItem][google.cloud.datacatalog.v1.DumpItem] type. `ImportEntries` returns a [long-running operation] [google.longrunning.Operation] resource that can be queried with [Operations.GetOperation][google.longrunning.Operations.GetOperation] to return [ImportEntriesMetadata][google.cloud.datacatalog.v1.ImportEntriesMetadata] and an [ImportEntriesResponse][google.cloud.datacatalog.v1.ImportEntriesResponse] message.", + "canonical": true, + "file": "data_catalog.import_entries.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ImportEntries", + "fullName": "google.cloud.datacatalog.v1.DataCatalog.ImportEntries", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "gcs_bucket_path", + "type": "TYPE_STRING" + }, + { + "name": "job_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataCatalogClient", + "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" + }, + "method": { + "shortName": "ImportEntries", + "fullName": "google.cloud.datacatalog.v1.DataCatalog.ImportEntries", + "service": { + "shortName": "DataCatalog", + "fullName": "google.cloud.datacatalog.v1.DataCatalog" + } + } + } + }, + { + "regionTag": "datacatalog_v1_generated_DataCatalog_SetConfig_async", + "title": "DataCatalog setConfig Sample", + "origin": "API_DEFINITION", + "description": " Sets the configuration related to the migration to Dataplex for an organization or project.", + "canonical": true, + "file": "data_catalog.set_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetConfig", + "fullName": "google.cloud.datacatalog.v1.DataCatalog.SetConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "tag_template_migration", + "type": ".google.cloud.datacatalog.v1.TagTemplateMigration" + }, + { + "name": "catalog_ui_experience", + "type": ".google.cloud.datacatalog.v1.CatalogUIExperience" + } + ], + "resultType": ".google.cloud.datacatalog.v1.MigrationConfig", + "client": { + "shortName": "DataCatalogClient", + "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" + }, + "method": { + "shortName": "SetConfig", + "fullName": "google.cloud.datacatalog.v1.DataCatalog.SetConfig", + "service": { + "shortName": "DataCatalog", + "fullName": "google.cloud.datacatalog.v1.DataCatalog" + } + } + } + }, + { + "regionTag": "datacatalog_v1_generated_DataCatalog_RetrieveConfig_async", + "title": "DataCatalog retrieveConfig Sample", + "origin": "API_DEFINITION", + "description": " Retrieves the configuration related to the migration from Data Catalog to Dataplex for a specific organization, including all the projects under it which have a separate configuration set.", + "canonical": true, + "file": "data_catalog.retrieve_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RetrieveConfig", + "fullName": "google.cloud.datacatalog.v1.DataCatalog.RetrieveConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.datacatalog.v1.OrganizationConfig", + "client": { + "shortName": "DataCatalogClient", + "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" + }, + "method": { + "shortName": "RetrieveConfig", + "fullName": "google.cloud.datacatalog.v1.DataCatalog.RetrieveConfig", + "service": { + "shortName": "DataCatalog", + "fullName": "google.cloud.datacatalog.v1.DataCatalog" + } + } + } + }, + { + "regionTag": "datacatalog_v1_generated_DataCatalog_RetrieveEffectiveConfig_async", + "title": "DataCatalog retrieveEffectiveConfig Sample", + "origin": "API_DEFINITION", + "description": " Retrieves the effective configuration related to the migration from Data Catalog to Dataplex for a specific organization or project. If there is no specific configuration set for the resource, the setting is checked hierarchicahlly through the ancestors of the resource, starting from the resource itself.", + "canonical": true, + "file": "data_catalog.retrieve_effective_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RetrieveEffectiveConfig", + "fullName": "google.cloud.datacatalog.v1.DataCatalog.RetrieveEffectiveConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.datacatalog.v1.MigrationConfig", + "client": { + "shortName": "DataCatalogClient", + "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" + }, + "method": { + "shortName": "RetrieveEffectiveConfig", + "fullName": "google.cloud.datacatalog.v1.DataCatalog.RetrieveEffectiveConfig", + "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": 71, + "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" + }, + { + "name": "filter", + "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": 62, + "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": 64, + "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" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/src/index.ts b/owl-bot-staging/google-cloud-datacatalog/v1/src/index.ts new file mode 100644 index 00000000000..8c76d4d1e22 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/src/index.ts @@ -0,0 +1,29 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; +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, DataCatalogClient, PolicyTagManagerClient, PolicyTagManagerSerializationClient}; +export default {v1, DataCatalogClient, PolicyTagManagerClient, PolicyTagManagerSerializationClient}; +import * as protos from '../protos/protos'; +export {protos} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/data_catalog_client.ts b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/data_catalog_client.ts new file mode 100644 index 00000000000..6ce4b1e71e9 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/data_catalog_client.ts @@ -0,0 +1,4651 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); + +/** + * Client JSON configuration object, loaded from + * `src/v1/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}; + private _universeDomain: string; + private _servicePath: string; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + 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} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new DataCatalogClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof DataCatalogClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'datacatalog.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + 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') + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined + }; + if (opts.fallback) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/*}/operations',}]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const reconcileTagsResponse = protoFilesRoot.lookup( + '.google.cloud.datacatalog.v1.ReconcileTagsResponse') as gax.protobuf.Type; + const reconcileTagsMetadata = protoFilesRoot.lookup( + '.google.cloud.datacatalog.v1.ReconcileTagsMetadata') as gax.protobuf.Type; + const importEntriesResponse = protoFilesRoot.lookup( + '.google.cloud.datacatalog.v1.ImportEntriesResponse') as gax.protobuf.Type; + const importEntriesMetadata = protoFilesRoot.lookup( + '.google.cloud.datacatalog.v1.ImportEntriesMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + reconcileTags: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + reconcileTagsResponse.decode.bind(reconcileTagsResponse), + reconcileTagsMetadata.decode.bind(reconcileTagsMetadata)), + importEntries: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + importEntriesResponse.decode.bind(importEntriesResponse), + importEntriesMetadata.decode.bind(importEntriesMetadata)) + }; + + // 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', 'reconcileTags', 'starEntry', 'unstarEntry', 'setIamPolicy', 'getIamPolicy', 'testIamPermissions', 'importEntries', 'setConfig', 'retrieveConfig', 'retrieveEffectiveConfig']; + 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] || + this.descriptors.longrunning[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. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'datacatalog.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'datacatalog.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * 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 {@link protos.google.cloud.datacatalog.v1.EntryGroup|EntryGroup}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.EntryGroup|EntryGroup}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.EntryGroup|EntryGroup}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.Entry|Entry}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.Entry|Entry}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 protos.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 {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.Entry|Entry}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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)](https://cloud.google.com//data-catalog/docs/fully-qualified-names) + * 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 {string} request.project + * Project where the lookup should be performed. Required to lookup + * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` + * using its `fully_qualified_name`. Ignored in other cases. + * @param {string} request.location + * Location where the lookup should be performed. Required to lookup + * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` + * using its `fully_qualified_name`. Ignored in other cases. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.datacatalog.v1.Entry|Entry}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 protos.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 {@link protos.google.cloud.datacatalog.v1.EntryOverview|EntryOverview}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 protos.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 {@link protos.google.cloud.datacatalog.v1.Contacts|Contacts}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.TagTemplate|TagTemplate}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.TagTemplate|TagTemplate}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.TagTemplate|TagTemplate}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.TagTemplateField|TagTemplateField}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.TagTemplateField|TagTemplateField}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.TagTemplateField|TagTemplateField}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.TagTemplateField|TagTemplateField}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 protos.google.cloud.datacatalog.v1.Entry|Entry} if the method name is + * `projects.locations.entryGroups.entries.tags.create`. + * * Or {@link protos.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 {@link protos.google.cloud.datacatalog.v1.Tag|Tag}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.Tag|Tag}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 protos.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 {@link protos.google.cloud.datacatalog.v1.StarEntryResponse|StarEntryResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 protos.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 {@link protos.google.cloud.datacatalog.v1.UnstarEntryResponse|UnstarEntryResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.iam.v1.Policy|Policy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.iam.v1.Policy|Policy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.iam.v1.TestIamPermissionsResponse|TestIamPermissionsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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); + } +/** + * Sets the configuration related to the migration to Dataplex for an + * organization or project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The organization or project whose config is being specified. + * @param {google.cloud.datacatalog.v1.TagTemplateMigration} request.tagTemplateMigration + * Opt-in status for the migration of Tag Templates to Dataplex. + * @param {google.cloud.datacatalog.v1.CatalogUIExperience} request.catalogUiExperience + * Opt-in status for the UI switch to Dataplex. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.datacatalog.v1.MigrationConfig|MigrationConfig}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_catalog.set_config.js + * region_tag:datacatalog_v1_generated_DataCatalog_SetConfig_async + */ + setConfig( + request?: protos.google.cloud.datacatalog.v1.ISetConfigRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.datacatalog.v1.IMigrationConfig, + protos.google.cloud.datacatalog.v1.ISetConfigRequest|undefined, {}|undefined + ]>; + setConfig( + request: protos.google.cloud.datacatalog.v1.ISetConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.datacatalog.v1.IMigrationConfig, + protos.google.cloud.datacatalog.v1.ISetConfigRequest|null|undefined, + {}|null|undefined>): void; + setConfig( + request: protos.google.cloud.datacatalog.v1.ISetConfigRequest, + callback: Callback< + protos.google.cloud.datacatalog.v1.IMigrationConfig, + protos.google.cloud.datacatalog.v1.ISetConfigRequest|null|undefined, + {}|null|undefined>): void; + setConfig( + request?: protos.google.cloud.datacatalog.v1.ISetConfigRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.datacatalog.v1.IMigrationConfig, + protos.google.cloud.datacatalog.v1.ISetConfigRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.datacatalog.v1.IMigrationConfig, + protos.google.cloud.datacatalog.v1.ISetConfigRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.datacatalog.v1.IMigrationConfig, + protos.google.cloud.datacatalog.v1.ISetConfigRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.setConfig(request, options, callback); + } +/** + * Retrieves the configuration related to the migration from Data Catalog to + * Dataplex for a specific organization, including all the projects under it + * which have a separate configuration set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The organization whose config is being retrieved. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.datacatalog.v1.OrganizationConfig|OrganizationConfig}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_catalog.retrieve_config.js + * region_tag:datacatalog_v1_generated_DataCatalog_RetrieveConfig_async + */ + retrieveConfig( + request?: protos.google.cloud.datacatalog.v1.IRetrieveConfigRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.datacatalog.v1.IOrganizationConfig, + protos.google.cloud.datacatalog.v1.IRetrieveConfigRequest|undefined, {}|undefined + ]>; + retrieveConfig( + request: protos.google.cloud.datacatalog.v1.IRetrieveConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.datacatalog.v1.IOrganizationConfig, + protos.google.cloud.datacatalog.v1.IRetrieveConfigRequest|null|undefined, + {}|null|undefined>): void; + retrieveConfig( + request: protos.google.cloud.datacatalog.v1.IRetrieveConfigRequest, + callback: Callback< + protos.google.cloud.datacatalog.v1.IOrganizationConfig, + protos.google.cloud.datacatalog.v1.IRetrieveConfigRequest|null|undefined, + {}|null|undefined>): void; + retrieveConfig( + request?: protos.google.cloud.datacatalog.v1.IRetrieveConfigRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.datacatalog.v1.IOrganizationConfig, + protos.google.cloud.datacatalog.v1.IRetrieveConfigRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.datacatalog.v1.IOrganizationConfig, + protos.google.cloud.datacatalog.v1.IRetrieveConfigRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.datacatalog.v1.IOrganizationConfig, + protos.google.cloud.datacatalog.v1.IRetrieveConfigRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.retrieveConfig(request, options, callback); + } +/** + * Retrieves the effective configuration related to the migration from Data + * Catalog to Dataplex for a specific organization or project. If there is no + * specific configuration set for the resource, the setting is checked + * hierarchicahlly through the ancestors of the resource, starting from the + * resource itself. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource whose effective config is being retrieved. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.datacatalog.v1.MigrationConfig|MigrationConfig}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_catalog.retrieve_effective_config.js + * region_tag:datacatalog_v1_generated_DataCatalog_RetrieveEffectiveConfig_async + */ + retrieveEffectiveConfig( + request?: protos.google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.datacatalog.v1.IMigrationConfig, + protos.google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest|undefined, {}|undefined + ]>; + retrieveEffectiveConfig( + request: protos.google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.datacatalog.v1.IMigrationConfig, + protos.google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest|null|undefined, + {}|null|undefined>): void; + retrieveEffectiveConfig( + request: protos.google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest, + callback: Callback< + protos.google.cloud.datacatalog.v1.IMigrationConfig, + protos.google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest|null|undefined, + {}|null|undefined>): void; + retrieveEffectiveConfig( + request?: protos.google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.datacatalog.v1.IMigrationConfig, + protos.google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.datacatalog.v1.IMigrationConfig, + protos.google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.datacatalog.v1.IMigrationConfig, + protos.google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.retrieveEffectiveConfig(request, options, callback); + } + +/** + * `ReconcileTags` creates or updates a list of tags on the entry. + * If the + * {@link protos.google.cloud.datacatalog.v1.ReconcileTagsRequest.force_delete_missing|ReconcileTagsRequest.force_delete_missing} + * parameter is set, the operation deletes tags not included in the input tag + * list. + * + * `ReconcileTags` returns a [long-running operation] + * [google.longrunning.Operation] resource that can be queried with + * {@link protos.google.longrunning.Operations.GetOperation|Operations.GetOperation} + * to return [ReconcileTagsMetadata] + * [google.cloud.datacatalog.v1.ReconcileTagsMetadata] and + * a [ReconcileTagsResponse] + * [google.cloud.datacatalog.v1.ReconcileTagsResponse] message. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Name of {@link protos.google.cloud.datacatalog.v1.Entry|Entry} to be tagged. + * @param {string} request.tagTemplate + * Required. The name of the tag template, which is used for reconciliation. + * @param {boolean} request.forceDeleteMissing + * If set to `true`, deletes entry tags related to a tag template + * not listed in the tags source from an entry. If set to `false`, + * unlisted tags are retained. + * @param {number[]} request.tags + * A list of tags to apply to an entry. A tag can specify a + * tag template, which must be the template specified in the + * `ReconcileTagsRequest`. + * The sole entry and each of its columns must be mentioned at most once. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_catalog.reconcile_tags.js + * region_tag:datacatalog_v1_generated_DataCatalog_ReconcileTags_async + */ + reconcileTags( + request?: protos.google.cloud.datacatalog.v1.IReconcileTagsRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + reconcileTags( + request: protos.google.cloud.datacatalog.v1.IReconcileTagsRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + reconcileTags( + request: protos.google.cloud.datacatalog.v1.IReconcileTagsRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + reconcileTags( + request?: protos.google.cloud.datacatalog.v1.IReconcileTagsRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.reconcileTags(request, options, callback); + } +/** + * Check the status of the long running operation returned by `reconcileTags()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_catalog.reconcile_tags.js + * region_tag:datacatalog_v1_generated_DataCatalog_ReconcileTags_async + */ + async checkReconcileTagsProgress(name: string): Promise>{ + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.reconcileTags, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Imports entries from a source, such as data previously dumped into a + * Cloud Storage bucket, into Data Catalog. Import of entries + * is a sync operation that reconciles the state of the third-party system + * with the Data Catalog. + * + * `ImportEntries` accepts source data snapshots of a third-party system. + * Snapshot should be delivered as a .wire or base65-encoded .txt file + * containing a sequence of Protocol Buffer messages of + * {@link protos.google.cloud.datacatalog.v1.DumpItem|DumpItem} type. + * + * `ImportEntries` returns a [long-running operation] + * [google.longrunning.Operation] resource that can be queried with + * {@link protos.google.longrunning.Operations.GetOperation|Operations.GetOperation} + * to return + * {@link protos.google.cloud.datacatalog.v1.ImportEntriesMetadata|ImportEntriesMetadata} + * and an + * {@link protos.google.cloud.datacatalog.v1.ImportEntriesResponse|ImportEntriesResponse} + * message. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Target entry group for ingested entries. + * @param {string} request.gcsBucketPath + * Path to a Cloud Storage bucket that contains a dump ready for ingestion. + * @param {string} [request.jobId] + * Optional. (Optional) Dataplex task job id, if specified will be used as + * part of ImportEntries LRO ID + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_catalog.import_entries.js + * region_tag:datacatalog_v1_generated_DataCatalog_ImportEntries_async + */ + importEntries( + request?: protos.google.cloud.datacatalog.v1.IImportEntriesRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + importEntries( + request: protos.google.cloud.datacatalog.v1.IImportEntriesRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + importEntries( + request: protos.google.cloud.datacatalog.v1.IImportEntriesRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + importEntries( + request?: protos.google.cloud.datacatalog.v1.IImportEntriesRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.importEntries(request, options, callback); + } +/** + * Check the status of the long running operation returned by `importEntries()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_catalog.import_entries.js + * region_tag:datacatalog_v1_generated_DataCatalog_ImportEntries_async + */ + async checkImportEntriesProgress(name: string): Promise>{ + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.importEntries, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * 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 + * Upper bound on the number of results you can get in a single response. + * + * 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 protos.google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token|SearchCatalogResponse.next_page_token} + * field of the response to a previous + * {@link protos.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 + * + * 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. + * If you are experiencing recall issues and you don't have to fetch the + * results in any specific order, consider setting this parameter to + * `default`. + * + * If this parameter is omitted, it defaults to the descending `relevance`. + * @param {boolean} [request.adminSearch] + * Optional. If set, use searchAll permission granted on organizations from + * `include_org_ids` and projects from `include_project_ids` instead of the + * fine grained per resource permissions when filtering the search results. + * The only allowed `order_by` criteria for admin_search mode is `default`. + * Using this flags guarantees a full recall of the 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 Array of {@link protos.google.cloud.datacatalog.v1.SearchCatalogResult|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 + * Upper bound on the number of results you can get in a single response. + * + * 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 protos.google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token|SearchCatalogResponse.next_page_token} + * field of the response to a previous + * {@link protos.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 + * + * 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. + * If you are experiencing recall issues and you don't have to fetch the + * results in any specific order, consider setting this parameter to + * `default`. + * + * If this parameter is omitted, it defaults to the descending `relevance`. + * @param {boolean} [request.adminSearch] + * Optional. If set, use searchAll permission granted on organizations from + * `include_org_ids` and projects from `include_project_ids` instead of the + * fine grained per resource permissions when filtering the search results. + * The only allowed `order_by` criteria for admin_search mode is `default`. + * Using this flags guarantees a full recall of the search results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.datacatalog.v1.SearchCatalogResult|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 + * Upper bound on the number of results you can get in a single response. + * + * 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 protos.google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token|SearchCatalogResponse.next_page_token} + * field of the response to a previous + * {@link protos.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 + * + * 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. + * If you are experiencing recall issues and you don't have to fetch the + * results in any specific order, consider setting this parameter to + * `default`. + * + * If this parameter is omitted, it defaults to the descending `relevance`. + * @param {boolean} [request.adminSearch] + * Optional. If set, use searchAll permission granted on organizations from + * `include_org_ids` and projects from `include_project_ids` instead of the + * fine grained per resource permissions when filtering the search results. + * The only allowed `order_by` criteria for admin_search mode is `default`. + * Using this flags guarantees a full recall of the search results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.datacatalog.v1.SearchCatalogResult|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.EntryGroup|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 {@link protos.google.cloud.datacatalog.v1.EntryGroup|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.datacatalog.v1.EntryGroup|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 protos.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 {@link protos.google.cloud.datacatalog.v1.Entry|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 {@link protos.google.cloud.datacatalog.v1.Entry|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.datacatalog.v1.Entry|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 protos.google.cloud.datacatalog.v1.Entry|Entry}. + * The {@link protos.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 protos.google.cloud.datacatalog.v1.Entry|Entry} + * or an {@link protos.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 {@link protos.google.cloud.datacatalog.v1.Tag|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 protos.google.cloud.datacatalog.v1.Entry|Entry} + * or an {@link protos.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 {@link protos.google.cloud.datacatalog.v1.Tag|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 protos.google.cloud.datacatalog.v1.Entry|Entry} + * or an {@link protos.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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.datacatalog.v1.Tag|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/data_catalog_client_config.json b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/data_catalog_client_config.json new file mode 100644 index 00000000000..d0baff98089 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/data_catalog_client_config.json @@ -0,0 +1,216 @@ +{ + "interfaces": { + "google.cloud.datacatalog.v1.DataCatalog": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "resource_exhausted_internal_unavailable": [ + "RESOURCE_EXHAUSTED", + "INTERNAL", + "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": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "CreateEntryGroup": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "GetEntryGroup": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "UpdateEntryGroup": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "DeleteEntryGroup": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "ListEntryGroups": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "CreateEntry": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "UpdateEntry": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "DeleteEntry": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "GetEntry": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "LookupEntry": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "ListEntries": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "ModifyEntryOverview": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "ModifyEntryContacts": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "CreateTagTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "GetTagTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "UpdateTagTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "DeleteTagTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "CreateTagTemplateField": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "UpdateTagTemplateField": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "RenameTagTemplateField": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "RenameTagTemplateFieldEnumValue": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "DeleteTagTemplateField": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "CreateTag": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "UpdateTag": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "DeleteTag": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "ListTags": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "ReconcileTags": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "StarEntry": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "UnstarEntry": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "ImportEntries": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "SetConfig": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "RetrieveConfig": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "RetrieveEffectiveConfig": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/data_catalog_proto_list.json b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/data_catalog_proto_list.json new file mode 100644 index 00000000000..e2d2eeac32a --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/data_catalog_proto_list.json @@ -0,0 +1,18 @@ +[ + "../../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/dump_content.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/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..ef8a3b561bf --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/gapic_metadata.json @@ -0,0 +1,605 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.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" + ] + }, + "SetConfig": { + "methods": [ + "setConfig" + ] + }, + "RetrieveConfig": { + "methods": [ + "retrieveConfig" + ] + }, + "RetrieveEffectiveConfig": { + "methods": [ + "retrieveEffectiveConfig" + ] + }, + "ReconcileTags": { + "methods": [ + "reconcileTags" + ] + }, + "ImportEntries": { + "methods": [ + "importEntries" + ] + }, + "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" + ] + }, + "SetConfig": { + "methods": [ + "setConfig" + ] + }, + "RetrieveConfig": { + "methods": [ + "retrieveConfig" + ] + }, + "RetrieveEffectiveConfig": { + "methods": [ + "retrieveEffectiveConfig" + ] + }, + "ReconcileTags": { + "methods": [ + "reconcileTags" + ] + }, + "ImportEntries": { + "methods": [ + "importEntries" + ] + }, + "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/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/index.ts b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/index.ts new file mode 100644 index 00000000000..a6998a86c14 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/index.ts @@ -0,0 +1,21 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_client.ts b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_client.ts new file mode 100644 index 00000000000..78dba3e5ec7 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_client.ts @@ -0,0 +1,2055 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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}; + private _universeDomain: string; + private _servicePath: string; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + 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} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new PolicyTagManagerClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof PolicyTagManagerClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'datacatalog.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + 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. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'datacatalog.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'datacatalog.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * 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 {@link protos.google.cloud.datacatalog.v1.Taxonomy|Taxonomy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.Taxonomy|Taxonomy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.Taxonomy|Taxonomy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.PolicyTag|PolicyTag}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.PolicyTag|PolicyTag}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.PolicyTag|PolicyTag}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.iam.v1.Policy|Policy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.iam.v1.Policy|Policy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.iam.v1.TestIamPermissionsResponse|TestIamPermissionsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {string} request.filter + * Supported field for filter is 'service' and value is 'dataplex'. + * Eg: service=dataplex. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.datacatalog.v1.Taxonomy|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 {string} request.filter + * Supported field for filter is 'service' and value is 'dataplex'. + * Eg: service=dataplex. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.datacatalog.v1.Taxonomy|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 {string} request.filter + * Supported field for filter is 'service' and value is 'dataplex'. + * Eg: service=dataplex. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.datacatalog.v1.Taxonomy|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.PolicyTag|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 {@link protos.google.cloud.datacatalog.v1.PolicyTag|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.datacatalog.v1.PolicyTag|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_client_config.json b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_client_config.json new file mode 100644 index 00000000000..03093f81c44 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_client_config.json @@ -0,0 +1,91 @@ +{ + "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/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_proto_list.json b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_proto_list.json new file mode 100644 index 00000000000..e2d2eeac32a --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_proto_list.json @@ -0,0 +1,18 @@ +[ + "../../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/dump_content.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/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_serialization_client.ts b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_serialization_client.ts new file mode 100644 index 00000000000..7cdfbbc766c --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_serialization_client.ts @@ -0,0 +1,1085 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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}; + private _universeDomain: string; + private _servicePath: string; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + 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} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new PolicyTagManagerSerializationClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof PolicyTagManagerSerializationClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'datacatalog.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + 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. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'datacatalog.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'datacatalog.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * 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 {@link protos.google.cloud.datacatalog.v1.Taxonomy|Taxonomy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.ImportTaxonomiesResponse|ImportTaxonomiesResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.ExportTaxonomiesResponse|ExportTaxonomiesResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/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/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_serialization_client_config.json b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_serialization_client_config.json new file mode 100644 index 00000000000..505c5d7f2c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_serialization_client_config.json @@ -0,0 +1,41 @@ +{ + "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/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_serialization_proto_list.json b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_serialization_proto_list.json new file mode 100644 index 00000000000..e2d2eeac32a --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_serialization_proto_list.json @@ -0,0 +1,18 @@ +[ + "../../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/dump_content.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/owl-bot-staging/google-cloud-datacatalog/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-datacatalog/v1/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..5b474f9796d --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/system-test/fixtures/sample/src/index.js @@ -0,0 +1,29 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-datacatalog/v1/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..4c012b3d052 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,44 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/system-test/install.ts b/owl-bot-staging/google-cloud-datacatalog/v1/system-test/install.ts new file mode 100644 index 00000000000..2a505d6df0c --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + + it('TypeScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() + } + }; + await packNTest(options); + }); + + it('JavaScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + } + }; + await packNTest(options); + }); + +}); diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/test/gapic_data_catalog_v1.ts b/owl-bot-staging/google-cloud-datacatalog/v1/test/gapic_data_catalog_v1.ts new file mode 100644 index 00000000000..2eda2279722 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/test/gapic_data_catalog_v1.ts @@ -0,0 +1,5321 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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, LROperation, operationsProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.DataCatalogClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new datacatalogModule.v1.DataCatalogClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new datacatalogModule.v1.DataCatalogClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = datacatalogModule.v1.DataCatalogClient.servicePath; + assert.strictEqual(servicePath, 'datacatalog.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = datacatalogModule.v1.DataCatalogClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new datacatalogModule.v1.DataCatalogClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datacatalog.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new datacatalogModule.v1.DataCatalogClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datacatalog.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new datacatalogModule.v1.DataCatalogClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datacatalog.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new datacatalogModule.v1.DataCatalogClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datacatalog.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new datacatalogModule.v1.DataCatalogClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + 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('setConfig', () => { + it('invokes setConfig 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.SetConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.v1.SetConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.datacatalog.v1.MigrationConfig() + ); + client.innerApiCalls.setConfig = stubSimpleCall(expectedResponse); + const [response] = await client.setConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setConfig 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.SetConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.v1.SetConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.datacatalog.v1.MigrationConfig() + ); + client.innerApiCalls.setConfig = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setConfig( + request, + (err?: Error|null, result?: protos.google.cloud.datacatalog.v1.IMigrationConfig|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setConfig 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.SetConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.v1.SetConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setConfig = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.setConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setConfig 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.SetConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.v1.SetConfigRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setConfig(request), expectedError); + }); + }); + + describe('retrieveConfig', () => { + it('invokes retrieveConfig 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.RetrieveConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.v1.RetrieveConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.datacatalog.v1.OrganizationConfig() + ); + client.innerApiCalls.retrieveConfig = stubSimpleCall(expectedResponse); + const [response] = await client.retrieveConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.retrieveConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.retrieveConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes retrieveConfig 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.RetrieveConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.v1.RetrieveConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.datacatalog.v1.OrganizationConfig() + ); + client.innerApiCalls.retrieveConfig = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.retrieveConfig( + request, + (err?: Error|null, result?: protos.google.cloud.datacatalog.v1.IOrganizationConfig|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.retrieveConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.retrieveConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes retrieveConfig 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.RetrieveConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.v1.RetrieveConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.retrieveConfig = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.retrieveConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.retrieveConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.retrieveConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes retrieveConfig 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.RetrieveConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.v1.RetrieveConfigRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.retrieveConfig(request), expectedError); + }); + }); + + describe('retrieveEffectiveConfig', () => { + it('invokes retrieveEffectiveConfig 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.RetrieveEffectiveConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.datacatalog.v1.MigrationConfig() + ); + client.innerApiCalls.retrieveEffectiveConfig = stubSimpleCall(expectedResponse); + const [response] = await client.retrieveEffectiveConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.retrieveEffectiveConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.retrieveEffectiveConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes retrieveEffectiveConfig 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.RetrieveEffectiveConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.datacatalog.v1.MigrationConfig() + ); + client.innerApiCalls.retrieveEffectiveConfig = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.retrieveEffectiveConfig( + request, + (err?: Error|null, result?: protos.google.cloud.datacatalog.v1.IMigrationConfig|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.retrieveEffectiveConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.retrieveEffectiveConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes retrieveEffectiveConfig 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.RetrieveEffectiveConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.retrieveEffectiveConfig = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.retrieveEffectiveConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.retrieveEffectiveConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.retrieveEffectiveConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes retrieveEffectiveConfig 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.RetrieveEffectiveConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.retrieveEffectiveConfig(request), expectedError); + }); + }); + + describe('reconcileTags', () => { + it('invokes reconcileTags 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.ReconcileTagsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.v1.ReconcileTagsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.reconcileTags = stubLongRunningCall(expectedResponse); + const [operation] = await client.reconcileTags(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.reconcileTags as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.reconcileTags as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes reconcileTags 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.ReconcileTagsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.v1.ReconcileTagsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.reconcileTags = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.reconcileTags( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.reconcileTags as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.reconcileTags as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes reconcileTags with call 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.ReconcileTagsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.v1.ReconcileTagsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.reconcileTags = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.reconcileTags(request), expectedError); + const actualRequest = (client.innerApiCalls.reconcileTags as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.reconcileTags as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes reconcileTags with LRO 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.ReconcileTagsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.v1.ReconcileTagsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.reconcileTags = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.reconcileTags(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.reconcileTags as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.reconcileTags as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkReconcileTagsProgress without error', async () => { + const client = new datacatalogModule.v1.DataCatalogClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkReconcileTagsProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkReconcileTagsProgress with error', async () => { + const client = new datacatalogModule.v1.DataCatalogClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkReconcileTagsProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('importEntries', () => { + it('invokes importEntries 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.ImportEntriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.v1.ImportEntriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.importEntries = stubLongRunningCall(expectedResponse); + const [operation] = await client.importEntries(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.importEntries as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importEntries as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importEntries 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.ImportEntriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.v1.ImportEntriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.importEntries = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.importEntries( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.importEntries as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importEntries as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importEntries with call 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.ImportEntriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.v1.ImportEntriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.importEntries = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.importEntries(request), expectedError); + const actualRequest = (client.innerApiCalls.importEntries as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importEntries as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importEntries with LRO 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.ImportEntriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.v1.ImportEntriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.importEntries = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.importEntries(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.importEntries as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importEntries as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkImportEntriesProgress without error', async () => { + const client = new datacatalogModule.v1.DataCatalogClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkImportEntriesProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkImportEntriesProgress with error', async () => { + const client = new datacatalogModule.v1.DataCatalogClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkImportEntriesProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + 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/owl-bot-staging/google-cloud-datacatalog/v1/test/gapic_policy_tag_manager_serialization_v1.ts b/owl-bot-staging/google-cloud-datacatalog/v1/test/gapic_policy_tag_manager_serialization_v1.ts new file mode 100644 index 00000000000..e88d8b77d3f --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/test/gapic_policy_tag_manager_serialization_v1.ts @@ -0,0 +1,971 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 apiEndpoint', () => { + const client = new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient.servicePath; + assert.strictEqual(servicePath, 'datacatalog.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datacatalog.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datacatalog.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datacatalog.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datacatalog.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + 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/owl-bot-staging/google-cloud-datacatalog/v1/test/gapic_policy_tag_manager_v1.ts b/owl-bot-staging/google-cloud-datacatalog/v1/test/gapic_policy_tag_manager_v1.ts new file mode 100644 index 00000000000..e3a954323c9 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/test/gapic_policy_tag_manager_v1.ts @@ -0,0 +1,2380 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 apiEndpoint', () => { + const client = new policytagmanagerModule.v1.PolicyTagManagerClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new policytagmanagerModule.v1.PolicyTagManagerClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = policytagmanagerModule.v1.PolicyTagManagerClient.servicePath; + assert.strictEqual(servicePath, 'datacatalog.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = policytagmanagerModule.v1.PolicyTagManagerClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new policytagmanagerModule.v1.PolicyTagManagerClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datacatalog.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new policytagmanagerModule.v1.PolicyTagManagerClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datacatalog.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new policytagmanagerModule.v1.PolicyTagManagerClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datacatalog.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new policytagmanagerModule.v1.PolicyTagManagerClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datacatalog.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new policytagmanagerModule.v1.PolicyTagManagerClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + 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/owl-bot-staging/google-cloud-datacatalog/v1/tsconfig.json b/owl-bot-staging/google-cloud-datacatalog/v1/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/webpack.config.js b/owl-bot-staging/google-cloud-datacatalog/v1/webpack.config.js new file mode 100644 index 00000000000..95cf943fced --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: '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', +}; diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/.eslintignore b/owl-bot-staging/google-cloud-datacatalog/v1beta1/.eslintignore new file mode 100644 index 00000000000..cfc348ec4d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/.eslintrc.json b/owl-bot-staging/google-cloud-datacatalog/v1beta1/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/.gitignore b/owl-bot-staging/google-cloud-datacatalog/v1beta1/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/.jsdoc.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/.jsdoc.js new file mode 100644 index 00000000000..ac28df7d11a --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 2025 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/datacatalog', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/.mocharc.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/.mocharc.js new file mode 100644 index 00000000000..24e9d15257f --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/.mocharc.js @@ -0,0 +1,33 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/.prettierrc.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/.prettierrc.js new file mode 100644 index 00000000000..d89a632f90b --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/.prettierrc.js @@ -0,0 +1,22 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/README.md b/owl-bot-staging/google-cloud-datacatalog/v1beta1/README.md new file mode 100644 index 00000000000..32cb6c97c40 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/README.md @@ -0,0 +1 @@ +Datacatalog: Nodejs Client diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/package.json b/owl-bot-staging/google-cloud-datacatalog/v1beta1/package.json new file mode 100644 index 00000000000..422f93bf7e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/package.json @@ -0,0 +1,60 @@ +{ + "name": "@google-cloud/datacatalog", + "version": "0.1.0", + "description": "Datacatalog client for Node.js", + "repository": "googleapis/nodejs-datacatalog", + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google datacatalog", + "datacatalog", + "data catalog", + "policy tag manager", + "policy tag manager serialization" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^4.3.4" + }, + "devDependencies": { + "@types/mocha": "^10.0.6", + "@types/node": "^20.12.12", + "@types/sinon": "^10.0.20", + "c8": "^9.1.0", + "gapic-tools": "^0.4.2", + "gts": "5.3.0", + "jsdoc": "^4.0.3", + "jsdoc-fresh": "^3.0.0", + "jsdoc-region-tag": "^3.0.0", + "mocha": "^10.4.0", + "pack-n-play": "^2.0.3", + "sinon": "^15.2.0", + "typescript": "5.1.6" + }, + "engines": { + "node": ">=v14" + } +} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/common.proto b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/common.proto new file mode 100644 index 00000000000..942cb2f8e0e --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/common.proto @@ -0,0 +1,50 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1beta1; + +option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb"; +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; +} + +// This enum describes all the systems that manage +// Taxonomy and PolicyTag resources in DataCatalog. +enum ManagingSystem { + // Default value + MANAGING_SYSTEM_UNSPECIFIED = 0; + + // Dataplex. + MANAGING_SYSTEM_DATAPLEX = 1; + + // Other + MANAGING_SYSTEM_OTHER = 2; +} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/datacatalog.proto b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/datacatalog.proto new file mode 100644 index 00000000000..f534b0037f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/datacatalog.proto @@ -0,0 +1,1315 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.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/cloud/datacatalog/v1beta1/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 csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb"; +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"; +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 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 subsequently 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"; + } + + // Renames an enum value in a tag template. The enum values have to be unique + // within one enum field. Thus, an enum value cannot be renamed with a name + // used in any other enum value within the same enum field. + rpc RenameTagTemplateFieldEnumValue(RenameTagTemplateFieldEnumValueRequest) + returns (TagTemplateField) { + option (google.api.http) = { + post: "/v1beta1/{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 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 tags assigned to an [Entry][google.cloud.datacatalog.v1beta1.Entry]. + // The [columns][google.cloud.datacatalog.v1beta1.Tag.column] in the response + // are lowercased. + 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 public datasets in the + // search results. Info on Google Cloud public datasets is available at + // https://cloud.google.com/public-datasets/. By default, Google Cloud + // public datasets are excluded. + bool include_gcp_public_datasets = 7; + + // Optional. The list of locations to search within. + // 1. If empty, search will be performed in all locations; + // 2. If any of the locations are NOT in the valid locations list, error + // will be returned; + // 3. Otherwise, search only the given locations for matching results. + // Typical usage is to leave this field empty. When a location is + // unreachable as returned in the `SearchCatalogResponse.unreachable` field, + // users can repeat the search request with this parameter set to get + // additional information on the error. + // + // Valid locations: + // * asia-east1 + // * asia-east2 + // * asia-northeast1 + // * asia-northeast2 + // * asia-northeast3 + // * asia-south1 + // * asia-southeast1 + // * australia-southeast1 + // * eu + // * europe-north1 + // * europe-west1 + // * europe-west2 + // * europe-west3 + // * europe-west4 + // * europe-west6 + // * global + // * northamerica-northeast1 + // * southamerica-east1 + // * us + // * us-central1 + // * us-east1 + // * us-east4 + // * us-west1 + // * us-west2 + repeated string restricted_locations = 16 + [(google.api.field_behavior) = OPTIONAL]; + } + + // 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]; + + // Optional. The query string in search query syntax. An empty query string + // will result in all data assets (in the specified scope) that the user has + // access to. 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) = OPTIONAL]; + + // 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 + // * `default` that can only be descending + // + // 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 approximate total number of entries matched by the query. + int32 total_size = 2; + + // The token that can be used to retrieve the next page of results. + string next_page_token = 3; + + // Unreachable locations. Search result does not include data from those + // locations. Users can get additional information on the error by repeating + // the search request with a more restrictive parameter -- setting the value + // for `SearchDataCatalogRequest.scope.restricted_locations`. + repeated string unreachable = 6; +} + +// 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]; + + // 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.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]; + + // 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. + // + // 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 should 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}" + }; + + // Output only. Identifier. 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.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER, + (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]; + + // Output only. Statistics on the usage level of the resource. + UsageSignal usage_signal = 13 [(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}" + }; + + // Identifier. 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 [(google.api.field_behavior) = IDENTIFIER]; + + // 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]; + + // Names of fields whose values to overwrite on a tag template. Currently, + // only `display_name` can be overwritten. + // + // 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 +// [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]; + + // Note: Currently, this parameter can only take `"fields"` as value. + // + // 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.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. 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.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 +// [RenameTagTemplateFieldEnumValue][google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateFieldEnumValue]. +message RenameTagTemplateFieldEnumValueRequest { + // Required. The name of the enum field value. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name} + 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.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/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto new file mode 100644 index 00000000000..e8acaa0ac77 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto @@ -0,0 +1,78 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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 csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb"; +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/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/policytagmanager.proto b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/policytagmanager.proto new file mode 100644 index 00000000000..5d38b0ed8af --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/policytagmanager.proto @@ -0,0 +1,452 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.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/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 csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb"; +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; + } + + // The source system of the Taxonomy. + message Service { + // The Google Cloud service name. + ManagingSystem name = 1; + + // The service agent for the service. + string identity = 2; + } + + // Identifier. Resource name of this taxonomy, whose format is: + // "projects/{project_number}/locations/{location_id}/taxonomies/{id}". + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // 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. + // + // The taxonomy display name must be unique within an organization. + 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]; + + // Output only. Number of policy tags contained in this taxonomy. + int32 policy_tag_count = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamps about this taxonomy. Only create_time and + // update_time are used. + 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]; + + // Output only. Identity of the service which owns the Taxonomy. This field is + // only populated when the taxonomy is created by a Google Cloud service. + // Currently only 'DATAPLEX' is supported. + Service service = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// 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}" + }; + + // Identifier. 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) = IDENTIFIER]; + + // 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; + + // Supported field for filter is 'service' and value is 'dataplex'. + // Eg: service=dataplex. + string filter = 4; +} + +// 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto new file mode 100644 index 00000000000..94f1c09a770 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto @@ -0,0 +1,169 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.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/policytagmanager.proto"; + +option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb"; +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; + + // A list of policy types that are activated for a taxonomy. + repeated Taxonomy.PolicyType activated_policy_types = 4; +} + +// Message representing one policy tag when exported as a nested proto. +message SerializedPolicyTag { + // Resource name of the policy tag. + // + // This field will be ignored when calling ImportTaxonomies. + string policy_tag = 1; + + // 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 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 be imported. + oneof source { + // Inline source used for taxonomies to be imported. + 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/schema.proto b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/schema.proto new file mode 100644 index 00000000000..5162e2ecb84 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/schema.proto @@ -0,0 +1,55 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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 csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb"; +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/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/search.proto b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/search.proto new file mode 100644 index 00000000000..04f89143a92 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/search.proto @@ -0,0 +1,73 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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 csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb"; +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; + + // Last-modified timestamp of the entry from the managing system. + google.protobuf.Timestamp modify_time = 7; +} + +// 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/table_spec.proto b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/table_spec.proto new file mode 100644 index 00000000000..df182bead85 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/table_spec.proto @@ -0,0 +1,105 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb"; +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; + + // 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 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/tags.proto b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/tags.proto new file mode 100644 index 00000000000..7762485f2cc --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/tags.proto @@ -0,0 +1,250 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb"; +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}" + }; + + // Identifier. 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 [(google.api.field_behavior) = IDENTIFIER]; + + // 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 Google Cloud 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}" + }; + + // This enum describes TagTemplate transfer status to Dataplex service. + enum DataplexTransferStatus { + // Default value. TagTemplate and its tags are only visible and editable in + // DataCatalog. + DATAPLEX_TRANSFER_STATUS_UNSPECIFIED = 0; + + // TagTemplate and its tags are auto-copied to Dataplex service. + // Visible in both services. Editable in DataCatalog, read-only in Dataplex. + // Deprecated: Individual TagTemplate migration is deprecated in favor of + // organization or project wide TagTemplate migration opt-in. + MIGRATED = 1 [deprecated = true]; + } + + // Identifier. 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 [(google.api.field_behavior) = IDENTIFIER]; + + // 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]; + + // Output only. Transfer status of the TagTemplate + DataplexTransferStatus dataplex_transfer_status = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// 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. Identifier. 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) = IDENTIFIER, + (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 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. 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 { + 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; + } + + 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]; + } + + repeated EnumValue allowed_values = 1; + } + + // 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/timestamps.proto b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/timestamps.proto new file mode 100644 index 00000000000..b2ebbac7604 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/timestamps.proto @@ -0,0 +1,41 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb"; +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/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/usage.proto b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/usage.proto new file mode 100644 index 00000000000..564ce752f63 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/usage.proto @@ -0,0 +1,59 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1beta1; + +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; +option go_package = "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb"; +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"; + +// Detailed counts on the entry's usage. +// Caveats: +// - Only BigQuery tables have usage stats +// - The usage stats only include BigQuery query jobs +// - The usage stats might be underestimated, e.g. wildcard table references +// are not yet counted in usage computation +// https://cloud.google.com/bigquery/docs/querying-wildcard-tables +message UsageStats { + // The number of times that the underlying entry was successfully used. + float total_completions = 1; + + // The number of times that the underlying entry was attempted to be used + // but failed. + float total_failures = 2; + + // The number of times that the underlying entry was attempted to be used + // but was cancelled by the user. + float total_cancellations = 3; + + // Total time spent (in milliseconds) during uses the resulted in completions. + float total_execution_time_for_completions_millis = 4; +} + +// The set of all usage signals that we store in Data Catalog. +message UsageSignal { + // The timestamp of the end of the usage statistics duration. + google.protobuf.Timestamp update_time = 1; + + // Usage statistics over each of the pre-defined time ranges, supported + // strings for time ranges are {"24H", "7D", "30D"}. + map usage_within_time_range = 2; +} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/protos.d.ts b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/protos.d.ts new file mode 100644 index 00000000000..6df5f06a403 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/protos.d.ts @@ -0,0 +1,17208 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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 v1beta1. */ + namespace v1beta1 { + + /** IntegratedSystem enum. */ + enum IntegratedSystem { + INTEGRATED_SYSTEM_UNSPECIFIED = 0, + BIGQUERY = 1, + CLOUD_PUBSUB = 2 + } + + /** ManagingSystem enum. */ + enum ManagingSystem { + MANAGING_SYSTEM_UNSPECIFIED = 0, + MANAGING_SYSTEM_DATAPLEX = 1, + MANAGING_SYSTEM_OTHER = 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 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.v1beta1.IRenameTagTemplateFieldEnumValueRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.RenameTagTemplateFieldEnumValueCallback): void; + + /** + * Calls RenameTagTemplateFieldEnumValue. + * @param request RenameTagTemplateFieldEnumValueRequest message or plain object + * @returns Promise + */ + public renameTagTemplateFieldEnumValue(request: google.cloud.datacatalog.v1beta1.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.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|renameTagTemplateFieldEnumValue}. + * @param error Error, if any + * @param [response] TagTemplateField + */ + type RenameTagTemplateFieldEnumValueCallback = (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); + + /** Scope restrictedLocations */ + restrictedLocations?: (string[]|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; + + /** Scope restrictedLocations. */ + public restrictedLocations: string[]; + + /** + * 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 totalSize */ + totalSize?: (number|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.v1beta1.ISearchCatalogResponse); + + /** SearchCatalogResponse results. */ + public results: google.cloud.datacatalog.v1beta1.ISearchCatalogResult[]; + + /** SearchCatalogResponse totalSize. */ + public totalSize: number; + + /** 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.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); + + /** Entry usageSignal */ + usageSignal?: (google.cloud.datacatalog.v1beta1.IUsageSignal|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 usageSignal. */ + public usageSignal?: (google.cloud.datacatalog.v1beta1.IUsageSignal|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 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.v1beta1.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.v1beta1.IRenameTagTemplateFieldEnumValueRequest): google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest; + + /** + * Encodes the specified RenameTagTemplateFieldEnumValueRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.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.v1beta1.IRenameTagTemplateFieldEnumValueRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RenameTagTemplateFieldEnumValueRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.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); + + /** SearchCatalogResult modifyTime */ + modifyTime?: (google.protobuf.ITimestamp|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; + + /** SearchCatalogResult modifyTime. */ + public modifyTime?: (google.protobuf.ITimestamp|null); + + /** + * 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, + 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.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); + + /** TagTemplate dataplexTransferStatus */ + dataplexTransferStatus?: (google.cloud.datacatalog.v1beta1.TagTemplate.DataplexTransferStatus|keyof typeof google.cloud.datacatalog.v1beta1.TagTemplate.DataplexTransferStatus|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 }; + + /** TagTemplate dataplexTransferStatus. */ + public dataplexTransferStatus: (google.cloud.datacatalog.v1beta1.TagTemplate.DataplexTransferStatus|keyof typeof google.cloud.datacatalog.v1beta1.TagTemplate.DataplexTransferStatus); + + /** + * 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; + } + + namespace TagTemplate { + + /** DataplexTransferStatus enum. */ + enum DataplexTransferStatus { + DATAPLEX_TRANSFER_STATUS_UNSPECIFIED = 0, + MIGRATED = 1 + } + } + + /** 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 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.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 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.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 { + + /** PrimitiveType enum. */ + enum PrimitiveType { + PRIMITIVE_TYPE_UNSPECIFIED = 0, + DOUBLE = 1, + STRING = 2, + BOOL = 3, + TIMESTAMP = 4 + } + + /** 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; + } + } + } + + /** 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.v1beta1.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.v1beta1.IUsageStats): google.cloud.datacatalog.v1beta1.UsageStats; + + /** + * Encodes the specified UsageStats message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.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.v1beta1.IUsageStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UsageStats message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.IUsageStats }|null); + } + + /** Represents a UsageSignal. */ + class UsageSignal implements IUsageSignal { + + /** + * Constructs a new UsageSignal. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.IUsageSignal); + + /** UsageSignal updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** UsageSignal usageWithinTimeRange. */ + public usageWithinTimeRange: { [k: string]: google.cloud.datacatalog.v1beta1.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.v1beta1.IUsageSignal): google.cloud.datacatalog.v1beta1.UsageSignal; + + /** + * Encodes the specified UsageSignal message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.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.v1beta1.IUsageSignal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UsageSignal message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.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 policyTagCount */ + policyTagCount?: (number|null); + + /** Taxonomy taxonomyTimestamps */ + taxonomyTimestamps?: (google.cloud.datacatalog.v1beta1.ISystemTimestamps|null); + + /** Taxonomy activatedPolicyTypes */ + activatedPolicyTypes?: (google.cloud.datacatalog.v1beta1.Taxonomy.PolicyType[]|null); + + /** Taxonomy service */ + service?: (google.cloud.datacatalog.v1beta1.Taxonomy.IService|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 policyTagCount. */ + public policyTagCount: number; + + /** Taxonomy taxonomyTimestamps. */ + public taxonomyTimestamps?: (google.cloud.datacatalog.v1beta1.ISystemTimestamps|null); + + /** Taxonomy activatedPolicyTypes. */ + public activatedPolicyTypes: google.cloud.datacatalog.v1beta1.Taxonomy.PolicyType[]; + + /** Taxonomy service. */ + public service?: (google.cloud.datacatalog.v1beta1.Taxonomy.IService|null); + + /** + * 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 Service. */ + interface IService { + + /** Service name */ + name?: (google.cloud.datacatalog.v1beta1.ManagingSystem|keyof typeof google.cloud.datacatalog.v1beta1.ManagingSystem|null); + + /** Service identity */ + identity?: (string|null); + } + + /** Represents a Service. */ + class Service implements IService { + + /** + * Constructs a new Service. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.Taxonomy.IService); + + /** Service name. */ + public name: (google.cloud.datacatalog.v1beta1.ManagingSystem|keyof typeof google.cloud.datacatalog.v1beta1.ManagingSystem); + + /** Service identity. */ + public identity: string; + + /** + * Creates a new Service instance using the specified properties. + * @param [properties] Properties to set + * @returns Service instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.Taxonomy.IService): google.cloud.datacatalog.v1beta1.Taxonomy.Service; + + /** + * Encodes the specified Service message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Taxonomy.Service.verify|verify} messages. + * @param message Service message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.Taxonomy.IService, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Service message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Taxonomy.Service.verify|verify} messages. + * @param message Service message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.Taxonomy.IService, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Service message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Service + * @throws {Error} If the payload is not a 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.Service; + + /** + * Decodes a Service message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Service + * @throws {Error} If the payload is 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.Service; + + /** + * Verifies a Service message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Service message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Service + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.Taxonomy.Service; + + /** + * Creates a plain object from a Service message. Also converts values to other types if specified. + * @param message Service + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.Taxonomy.Service, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Service to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Service + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** 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); + + /** ListTaxonomiesRequest filter */ + filter?: (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; + + /** ListTaxonomiesRequest filter. */ + public filter: 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); + + /** SerializedTaxonomy activatedPolicyTypes */ + activatedPolicyTypes?: (google.cloud.datacatalog.v1beta1.Taxonomy.PolicyType[]|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[]; + + /** SerializedTaxonomy activatedPolicyTypes. */ + public activatedPolicyTypes: google.cloud.datacatalog.v1beta1.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.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 policyTag */ + policyTag?: (string|null); + + /** 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 policyTag. */ + public policyTag: string; + + /** 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 { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { + + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); + + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + } + + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { + + /** + * Constructs a new CommonLanguageSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICommonLanguageSettings); + + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; + + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; + + /** + * Verifies a CommonLanguageSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { + + /** ClientLibrarySettings version */ + version?: (string|null); + + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); + + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } + + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { + + /** + * Constructs a new ClientLibrarySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IClientLibrarySettings); + + /** ClientLibrarySettings version. */ + public version: string; + + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; + + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientLibrarySettings instance + */ + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; + + /** + * Verifies a ClientLibrarySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientLibrarySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientLibrarySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publishing. */ + interface IPublishing { + + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); + + /** Publishing newIssueUri */ + newIssueUri?: (string|null); + + /** Publishing documentationUri */ + documentationUri?: (string|null); + + /** Publishing apiShortName */ + apiShortName?: (string|null); + + /** Publishing githubLabel */ + githubLabel?: (string|null); + + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); + + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); + + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); + + /** Publishing restReferenceDocumentationUri */ + restReferenceDocumentationUri?: (string|null); + } + + /** Represents a Publishing. */ + class Publishing implements IPublishing { + + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); + + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; + + /** Publishing newIssueUri. */ + public newIssueUri: string; + + /** Publishing documentationUri. */ + public documentationUri: string; + + /** Publishing apiShortName. */ + public apiShortName: string; + + /** Publishing githubLabel. */ + public githubLabel: string; + + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; + + /** Publishing docTagPrefix. */ + public docTagPrefix: string; + + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; + + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + + /** Publishing restReferenceDocumentationUri. */ + public restReferenceDocumentationUri: string; + + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; + + /** + * Verifies a Publishing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; + + /** + * Verifies a JavaSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; + + /** + * Verifies a CppSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; + + /** + * Verifies a PhpSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; + + /** + * Verifies a PythonSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; + + /** + * Verifies a NodeSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); + } + + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { + + /** + * Constructs a new DotnetSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDotnetSettings); + + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DotnetSettings instance + */ + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; + + /** + * Verifies a DotnetSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DotnetSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DotnetSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DotnetSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RubySettings. */ + interface IRubySettings { + + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { + + /** + * Constructs a new RubySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRubySettings); + + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new RubySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RubySettings instance + */ + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; + + /** + * Verifies a RubySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RubySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RubySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RubySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoSettings. */ + interface IGoSettings { + + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; + + /** + * Verifies a GoSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields */ + autoPopulatedFields?: (string[]|null); + } + + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { + + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); + + /** MethodSettings selector. */ + public selector: string; + + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodSettings instance + */ + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; + + /** + * Verifies a MethodSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodSettings { + + /** Properties of a LongRunning. */ + interface ILongRunning { + + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); + + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { + + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); + + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; + + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; + + /** + * Verifies a LongRunning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4, + SHOPPING = 5, + GEO = 6, + GENERATIVE_AI = 7 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7, + IDENTIFIER = 8 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Verifies a Declaration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions debugRedact. */ + public debugRedact: boolean; + + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + + /** FieldOptions targets. */ + public targets: google.protobuf.FieldOptions.OptionTargetType[]; + + /** FieldOptions editionDefaults. */ + public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + + /** FieldOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } + + /** OptionTargetType enum. */ + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9 + } + + /** Properties of an EditionDefault. */ + interface IEditionDefault { + + /** EditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** EditionDefault value */ + value?: (string|null); + } + + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { + + /** + * Constructs a new EditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + + /** EditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** EditionDefault value. */ + public value: string; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns EditionDefault instance + */ + public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; + + /** + * Verifies an EditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @param message EditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** EnumOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** EnumOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact */ + debugRedact?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact. */ + public debugRedact: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + + /** ServiceOptions .google.api.apiVersion */ + ".google.api.apiVersion"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a FeatureSet. */ + interface IFeatureSet { + + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + } + + /** Represents a FeatureSet. */ + class FeatureSet implements IFeatureSet { + + /** + * Constructs a new FeatureSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSet); + + /** FeatureSet fieldPresence. */ + public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + + /** FeatureSet enumType. */ + public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + + /** FeatureSet repeatedFieldEncoding. */ + public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + + /** FeatureSet utf8Validation. */ + public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); + + /** FeatureSet messageEncoding. */ + public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + + /** FeatureSet jsonFormat. */ + public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + + /** + * Creates a new FeatureSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSet instance + */ + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; + + /** + * Verifies a FeatureSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @param message FeatureSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSet { + + /** FieldPresence enum. */ + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3 + } + + /** EnumType enum. */ + enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2 + } + + /** RepeatedFieldEncoding enum. */ + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + PACKED = 1, + EXPANDED = 2 + } + + /** Utf8Validation enum. */ + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0, + VERIFY = 2, + NONE = 3 + } + + /** MessageEncoding enum. */ + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0, + LENGTH_PREFIXED = 1, + DELIMITED = 2 + } + + /** JsonFormat enum. */ + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0, + ALLOW = 1, + LEGACY_BEST_EFFORT = 2 + } + } + + /** Properties of a FeatureSetDefaults. */ + interface IFeatureSetDefaults { + + /** FeatureSetDefaults defaults */ + defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + + /** FeatureSetDefaults minimumEdition */ + minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetDefaults maximumEdition */ + maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSetDefaults. */ + class FeatureSetDefaults implements IFeatureSetDefaults { + + /** + * Constructs a new FeatureSetDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSetDefaults); + + /** FeatureSetDefaults defaults. */ + public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + + /** FeatureSetDefaults minimumEdition. */ + public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetDefaults maximumEdition. */ + public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetDefaults instance + */ + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; + + /** + * Verifies a FeatureSetDefaults message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetDefaults + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @param message FeatureSetDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSetDefaults { + + /** Properties of a FeatureSetEditionDefault. */ + interface IFeatureSetEditionDefault { + + /** FeatureSetEditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetEditionDefault features */ + features?: (google.protobuf.IFeatureSet|null); + } + + /** Represents a FeatureSetEditionDefault. */ + class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + + /** + * Constructs a new FeatureSetEditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + + /** FeatureSetEditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetEditionDefault features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetEditionDefault instance + */ + public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Verifies a FeatureSetEditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetEditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @param message FeatureSetEditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/protos.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/protos.js new file mode 100644 index 00000000000..89dd891ba54 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/protos.js @@ -0,0 +1,43311 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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.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; + })(); + + /** + * ManagingSystem enum. + * @name google.cloud.datacatalog.v1beta1.ManagingSystem + * @enum {number} + * @property {number} MANAGING_SYSTEM_UNSPECIFIED=0 MANAGING_SYSTEM_UNSPECIFIED value + * @property {number} MANAGING_SYSTEM_DATAPLEX=1 MANAGING_SYSTEM_DATAPLEX value + * @property {number} MANAGING_SYSTEM_OTHER=2 MANAGING_SYSTEM_OTHER value + */ + v1beta1.ManagingSystem = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MANAGING_SYSTEM_UNSPECIFIED"] = 0; + values[valuesById[1] = "MANAGING_SYSTEM_DATAPLEX"] = 1; + values[valuesById[2] = "MANAGING_SYSTEM_OTHER"] = 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|renameTagTemplateFieldEnumValue}. + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @typedef RenameTagTemplateFieldEnumValueCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.TagTemplateField} [response] TagTemplateField + */ + + /** + * Calls RenameTagTemplateFieldEnumValue. + * @function renameTagTemplateFieldEnumValue + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldEnumValueRequest} request RenameTagTemplateFieldEnumValueRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.RenameTagTemplateFieldEnumValueRequest, $root.google.cloud.datacatalog.v1beta1.TagTemplateField, request, callback); + }, "name", { value: "RenameTagTemplateFieldEnumValue" }); + + /** + * Calls RenameTagTemplateFieldEnumValue. + * @function renameTagTemplateFieldEnumValue + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldEnumValueRequest} request RenameTagTemplateFieldEnumValueRequest 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 + * @property {Array.|null} [restrictedLocations] Scope restrictedLocations + */ + + /** + * 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 = []; + 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.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; + + /** + * Scope restrictedLocations. + * @member {Array.} restrictedLocations + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope + * @instance + */ + Scope.prototype.restrictedLocations = $util.emptyArray; + + /** + * 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); + 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]); + 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; + } + case 16: { + if (!(message.restrictedLocations && message.restrictedLocations.length)) + message.restrictedLocations = []; + message.restrictedLocations.push(reader.string()); + 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"; + 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"; + } + 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); + if (object.restrictedLocations) { + if (!Array.isArray(object.restrictedLocations)) + throw TypeError(".google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.restrictedLocations: array expected"); + message.restrictedLocations = []; + for (var i = 0; i < object.restrictedLocations.length; ++i) + message.restrictedLocations[i] = String(object.restrictedLocations[i]); + } + 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 = []; + object.restrictedLocations = []; + } + 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; + if (message.restrictedLocations && message.restrictedLocations.length) { + object.restrictedLocations = []; + for (var j = 0; j < message.restrictedLocations.length; ++j) + object.restrictedLocations[j] = message.restrictedLocations[j]; + } + 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 {number|null} [totalSize] SearchCatalogResponse totalSize + * @property {string|null} [nextPageToken] SearchCatalogResponse nextPageToken + * @property {Array.|null} [unreachable] SearchCatalogResponse unreachable + */ + + /** + * 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 = []; + 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.v1beta1.SearchCatalogResponse + * @instance + */ + SearchCatalogResponse.prototype.results = $util.emptyArray; + + /** + * SearchCatalogResponse totalSize. + * @member {number} totalSize + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse + * @instance + */ + SearchCatalogResponse.prototype.totalSize = 0; + + /** + * SearchCatalogResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse + * @instance + */ + SearchCatalogResponse.prototype.nextPageToken = ""; + + /** + * SearchCatalogResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse + * @instance + */ + SearchCatalogResponse.prototype.unreachable = $util.emptyArray; + + /** + * 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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.totalSize); + 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.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 2: { + message.totalSize = reader.int32(); + 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.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.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + 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.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.totalSize != null) + message.totalSize = object.totalSize | 0; + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.datacatalog.v1beta1.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.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 = []; + object.unreachable = []; + } + if (options.defaults) { + object.totalSize = 0; + 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.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + 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.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 + * @property {google.cloud.datacatalog.v1beta1.IUsageSignal|null} [usageSignal] Entry usageSignal + */ + + /** + * 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; + + /** + * Entry usageSignal. + * @member {google.cloud.datacatalog.v1beta1.IUsageSignal|null|undefined} usageSignal + * @memberof google.cloud.datacatalog.v1beta1.Entry + * @instance + */ + Entry.prototype.usageSignal = 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.usageSignal != null && Object.hasOwnProperty.call(message, "usageSignal")) + $root.google.cloud.datacatalog.v1beta1.UsageSignal.encode(message.usageSignal, writer.uint32(/* id 13, wireType 2 =*/106).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; + } + case 13: { + message.usageSignal = $root.google.cloud.datacatalog.v1beta1.UsageSignal.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; + } + if (message.usageSignal != null && message.hasOwnProperty("usageSignal")) { + var error = $root.google.cloud.datacatalog.v1beta1.UsageSignal.verify(message.usageSignal); + if (error) + return "usageSignal." + 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); + } + if (object.usageSignal != null) { + if (typeof object.usageSignal !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.Entry.usageSignal: object expected"); + message.usageSignal = $root.google.cloud.datacatalog.v1beta1.UsageSignal.fromObject(object.usageSignal); + } + 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 = ""; + object.usageSignal = 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.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.usageSignal != null && message.hasOwnProperty("usageSignal")) + object.usageSignal = $root.google.cloud.datacatalog.v1beta1.UsageSignal.toObject(message.usageSignal, options); + 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.RenameTagTemplateFieldEnumValueRequest = (function() { + + /** + * Properties of a RenameTagTemplateFieldEnumValueRequest. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface IRenameTagTemplateFieldEnumValueRequest + * @property {string|null} [name] RenameTagTemplateFieldEnumValueRequest name + * @property {string|null} [newEnumValueDisplayName] RenameTagTemplateFieldEnumValueRequest newEnumValueDisplayName + */ + + /** + * Constructs a new RenameTagTemplateFieldEnumValueRequest. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a RenameTagTemplateFieldEnumValueRequest. + * @implements IRenameTagTemplateFieldEnumValueRequest + * @constructor + * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.RenameTagTemplateFieldEnumValueRequest + * @instance + */ + RenameTagTemplateFieldEnumValueRequest.prototype.name = ""; + + /** + * RenameTagTemplateFieldEnumValueRequest newEnumValueDisplayName. + * @member {string} newEnumValueDisplayName + * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest + * @instance + */ + RenameTagTemplateFieldEnumValueRequest.prototype.newEnumValueDisplayName = ""; + + /** + * Creates a new RenameTagTemplateFieldEnumValueRequest instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldEnumValueRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest} RenameTagTemplateFieldEnumValueRequest instance + */ + RenameTagTemplateFieldEnumValueRequest.create = function create(properties) { + return new RenameTagTemplateFieldEnumValueRequest(properties); + }; + + /** + * Encodes the specified RenameTagTemplateFieldEnumValueRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.RenameTagTemplateFieldEnumValueRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.RenameTagTemplateFieldEnumValueRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.RenameTagTemplateFieldEnumValueRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest} RenameTagTemplateFieldEnumValueRequest + */ + RenameTagTemplateFieldEnumValueRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.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.v1beta1.RenameTagTemplateFieldEnumValueRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.RenameTagTemplateFieldEnumValueRequest"; + }; + + return RenameTagTemplateFieldEnumValueRequest; + })(); + + 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 + * @property {google.protobuf.ITimestamp|null} [modifyTime] SearchCatalogResult modifyTime + */ + + /** + * 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 = ""; + + /** + * SearchCatalogResult modifyTime. + * @member {google.protobuf.ITimestamp|null|undefined} modifyTime + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult + * @instance + */ + SearchCatalogResult.prototype.modifyTime = null; + + /** + * 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); + 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(); + 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; + } + case 7: { + message.modifyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + 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"; + if (message.modifyTime != null && message.hasOwnProperty("modifyTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.modifyTime); + if (error) + return "modifyTime." + error; + } + 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); + if (object.modifyTime != null) { + if (typeof object.modifyTime !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.SearchCatalogResult.modifyTime: object expected"); + message.modifyTime = $root.google.protobuf.Timestamp.fromObject(object.modifyTime); + } + 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 = ""; + object.modifyTime = null; + } + 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; + if (message.modifyTime != null && message.hasOwnProperty("modifyTime")) + object.modifyTime = $root.google.protobuf.Timestamp.toObject(message.modifyTime, options); + 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: + case 7: + 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; + case "BIGQUERY_MATERIALIZED_VIEW": + case 7: + message.tableSourceType = 7; + 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 + * @property {number} BIGQUERY_MATERIALIZED_VIEW=7 BIGQUERY_MATERIALIZED_VIEW 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; + values[valuesById[7] = "BIGQUERY_MATERIALIZED_VIEW"] = 7; + 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 + * @property {google.cloud.datacatalog.v1beta1.TagTemplate.DataplexTransferStatus|null} [dataplexTransferStatus] TagTemplate dataplexTransferStatus + */ + + /** + * 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; + + /** + * TagTemplate dataplexTransferStatus. + * @member {google.cloud.datacatalog.v1beta1.TagTemplate.DataplexTransferStatus} dataplexTransferStatus + * @memberof google.cloud.datacatalog.v1beta1.TagTemplate + * @instance + */ + TagTemplate.prototype.dataplexTransferStatus = 0; + + /** + * 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(); + } + if (message.dataplexTransferStatus != null && Object.hasOwnProperty.call(message, "dataplexTransferStatus")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.dataplexTransferStatus); + 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; + } + case 7: { + message.dataplexTransferStatus = reader.int32(); + 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; + } + } + if (message.dataplexTransferStatus != null && message.hasOwnProperty("dataplexTransferStatus")) + switch (message.dataplexTransferStatus) { + default: + return "dataplexTransferStatus: enum value expected"; + case 0: + case 1: + break; + } + 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]]); + } + } + switch (object.dataplexTransferStatus) { + default: + if (typeof object.dataplexTransferStatus === "number") { + message.dataplexTransferStatus = object.dataplexTransferStatus; + break; + } + break; + case "DATAPLEX_TRANSFER_STATUS_UNSPECIFIED": + case 0: + message.dataplexTransferStatus = 0; + break; + case "MIGRATED": + case 1: + message.dataplexTransferStatus = 1; + break; + } + 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 = ""; + object.dataplexTransferStatus = options.enums === String ? "DATAPLEX_TRANSFER_STATUS_UNSPECIFIED" : 0; + } + 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); + } + if (message.dataplexTransferStatus != null && message.hasOwnProperty("dataplexTransferStatus")) + object.dataplexTransferStatus = options.enums === String ? $root.google.cloud.datacatalog.v1beta1.TagTemplate.DataplexTransferStatus[message.dataplexTransferStatus] === undefined ? message.dataplexTransferStatus : $root.google.cloud.datacatalog.v1beta1.TagTemplate.DataplexTransferStatus[message.dataplexTransferStatus] : message.dataplexTransferStatus; + 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"; + }; + + /** + * DataplexTransferStatus enum. + * @name google.cloud.datacatalog.v1beta1.TagTemplate.DataplexTransferStatus + * @enum {number} + * @property {number} DATAPLEX_TRANSFER_STATUS_UNSPECIFIED=0 DATAPLEX_TRANSFER_STATUS_UNSPECIFIED value + * @property {number} MIGRATED=1 MIGRATED value + */ + TagTemplate.DataplexTransferStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATAPLEX_TRANSFER_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "MIGRATED"] = 1; + return values; + })(); + + 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 {string|null} [description] TagTemplateField description + * @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 description. + * @member {string} description + * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField + * @instance + */ + TagTemplateField.prototype.description = ""; + + /** + * 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.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.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 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.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.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.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.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.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.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.v1beta1.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.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"; + }; + + /** + * 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; + })(); + + 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; + })(); + + return FieldType; + })(); + + v1beta1.UsageStats = (function() { + + /** + * Properties of a UsageStats. + * @memberof google.cloud.datacatalog.v1beta1 + * @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.v1beta1 + * @classdesc Represents a UsageStats. + * @implements IUsageStats + * @constructor + * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.UsageStats + * @instance + */ + UsageStats.prototype.totalCompletions = 0; + + /** + * UsageStats totalFailures. + * @member {number} totalFailures + * @memberof google.cloud.datacatalog.v1beta1.UsageStats + * @instance + */ + UsageStats.prototype.totalFailures = 0; + + /** + * UsageStats totalCancellations. + * @member {number} totalCancellations + * @memberof google.cloud.datacatalog.v1beta1.UsageStats + * @instance + */ + UsageStats.prototype.totalCancellations = 0; + + /** + * UsageStats totalExecutionTimeForCompletionsMillis. + * @member {number} totalExecutionTimeForCompletionsMillis + * @memberof google.cloud.datacatalog.v1beta1.UsageStats + * @instance + */ + UsageStats.prototype.totalExecutionTimeForCompletionsMillis = 0; + + /** + * Creates a new UsageStats instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.UsageStats + * @static + * @param {google.cloud.datacatalog.v1beta1.IUsageStats=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.UsageStats} UsageStats instance + */ + UsageStats.create = function create(properties) { + return new UsageStats(properties); + }; + + /** + * Encodes the specified UsageStats message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UsageStats.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.UsageStats + * @static + * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.UsageStats.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.UsageStats + * @static + * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.UsageStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.UsageStats + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.UsageStats} UsageStats + */ + UsageStats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.UsageStats) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.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.v1beta1.UsageStats + * @static + * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.UsageStats"; + }; + + return UsageStats; + })(); + + v1beta1.UsageSignal = (function() { + + /** + * Properties of a UsageSignal. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface IUsageSignal + * @property {google.protobuf.ITimestamp|null} [updateTime] UsageSignal updateTime + * @property {Object.|null} [usageWithinTimeRange] UsageSignal usageWithinTimeRange + */ + + /** + * Constructs a new UsageSignal. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a UsageSignal. + * @implements IUsageSignal + * @constructor + * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.UsageSignal + * @instance + */ + UsageSignal.prototype.updateTime = null; + + /** + * UsageSignal usageWithinTimeRange. + * @member {Object.} usageWithinTimeRange + * @memberof google.cloud.datacatalog.v1beta1.UsageSignal + * @instance + */ + UsageSignal.prototype.usageWithinTimeRange = $util.emptyObject; + + /** + * Creates a new UsageSignal instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.UsageSignal + * @static + * @param {google.cloud.datacatalog.v1beta1.IUsageSignal=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.UsageSignal} UsageSignal instance + */ + UsageSignal.create = function create(properties) { + return new UsageSignal(properties); + }; + + /** + * Encodes the specified UsageSignal message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UsageSignal.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.UsageSignal + * @static + * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.UsageSignal.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.UsageSignal + * @static + * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.UsageSignal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.UsageSignal + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.UsageSignal} UsageSignal + */ + UsageSignal.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.UsageSignal) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.UsageSignal(); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.UsageSignal.usageWithinTimeRange: object expected"); + message.usageWithinTimeRange[keys[i]] = $root.google.cloud.datacatalog.v1beta1.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.v1beta1.UsageSignal + * @static + * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.UsageStats.toObject(message.usageWithinTimeRange[keys2[j]], options); + } + return object; + }; + + /** + * Converts this UsageSignal to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.UsageSignal"; + }; + + return UsageSignal; + })(); + + 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 {number|null} [policyTagCount] Taxonomy policyTagCount + * @property {google.cloud.datacatalog.v1beta1.ISystemTimestamps|null} [taxonomyTimestamps] Taxonomy taxonomyTimestamps + * @property {Array.|null} [activatedPolicyTypes] Taxonomy activatedPolicyTypes + * @property {google.cloud.datacatalog.v1beta1.Taxonomy.IService|null} [service] Taxonomy service + */ + + /** + * 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 policyTagCount. + * @member {number} policyTagCount + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy + * @instance + */ + Taxonomy.prototype.policyTagCount = 0; + + /** + * Taxonomy taxonomyTimestamps. + * @member {google.cloud.datacatalog.v1beta1.ISystemTimestamps|null|undefined} taxonomyTimestamps + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy + * @instance + */ + Taxonomy.prototype.taxonomyTimestamps = null; + + /** + * Taxonomy activatedPolicyTypes. + * @member {Array.} activatedPolicyTypes + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy + * @instance + */ + Taxonomy.prototype.activatedPolicyTypes = $util.emptyArray; + + /** + * Taxonomy service. + * @member {google.cloud.datacatalog.v1beta1.Taxonomy.IService|null|undefined} service + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy + * @instance + */ + Taxonomy.prototype.service = null; + + /** + * 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.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.v1beta1.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(); + } + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + $root.google.cloud.datacatalog.v1beta1.Taxonomy.Service.encode(message.service, writer.uint32(/* id 7, wireType 2 =*/58).fork()).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 4: { + message.policyTagCount = reader.int32(); + break; + } + case 5: { + message.taxonomyTimestamps = $root.google.cloud.datacatalog.v1beta1.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; + } + case 7: { + message.service = $root.google.cloud.datacatalog.v1beta1.Taxonomy.Service.decode(reader, reader.uint32()); + 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.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.v1beta1.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; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + var error = $root.google.cloud.datacatalog.v1beta1.Taxonomy.Service.verify(message.service); + if (error) + return "service." + error; + } + 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.policyTagCount != null) + message.policyTagCount = object.policyTagCount | 0; + if (object.taxonomyTimestamps != null) { + if (typeof object.taxonomyTimestamps !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.Taxonomy.taxonomyTimestamps: object expected"); + message.taxonomyTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.fromObject(object.taxonomyTimestamps); + } + 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; + } + } + if (object.service != null) { + if (typeof object.service !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.Taxonomy.service: object expected"); + message.service = $root.google.cloud.datacatalog.v1beta1.Taxonomy.Service.fromObject(object.service); + } + 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 = ""; + object.policyTagCount = 0; + object.taxonomyTimestamps = null; + object.service = 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.v1beta1.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.v1beta1.Taxonomy.PolicyType[message.activatedPolicyTypes[j]] === undefined ? message.activatedPolicyTypes[j] : $root.google.cloud.datacatalog.v1beta1.Taxonomy.PolicyType[message.activatedPolicyTypes[j]] : message.activatedPolicyTypes[j]; + } + if (message.service != null && message.hasOwnProperty("service")) + object.service = $root.google.cloud.datacatalog.v1beta1.Taxonomy.Service.toObject(message.service, options); + 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; + })(); + + Taxonomy.Service = (function() { + + /** + * Properties of a Service. + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy + * @interface IService + * @property {google.cloud.datacatalog.v1beta1.ManagingSystem|null} [name] Service name + * @property {string|null} [identity] Service identity + */ + + /** + * Constructs a new Service. + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy + * @classdesc Represents a Service. + * @implements IService + * @constructor + * @param {google.cloud.datacatalog.v1beta1.Taxonomy.IService=} [properties] Properties to set + */ + function Service(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Service name. + * @member {google.cloud.datacatalog.v1beta1.ManagingSystem} name + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy.Service + * @instance + */ + Service.prototype.name = 0; + + /** + * Service identity. + * @member {string} identity + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy.Service + * @instance + */ + Service.prototype.identity = ""; + + /** + * Creates a new Service instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy.Service + * @static + * @param {google.cloud.datacatalog.v1beta1.Taxonomy.IService=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.Taxonomy.Service} Service instance + */ + Service.create = function create(properties) { + return new Service(properties); + }; + + /** + * Encodes the specified Service message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Taxonomy.Service.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy.Service + * @static + * @param {google.cloud.datacatalog.v1beta1.Taxonomy.IService} message Service message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Service.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.name); + if (message.identity != null && Object.hasOwnProperty.call(message, "identity")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.identity); + return writer; + }; + + /** + * Encodes the specified Service message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Taxonomy.Service.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy.Service + * @static + * @param {google.cloud.datacatalog.v1beta1.Taxonomy.IService} message Service message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Service.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Service message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy.Service + * @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.Service} Service + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Service.decode = function decode(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.Service(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.int32(); + break; + } + case 2: { + message.identity = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Service message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy.Service + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.Taxonomy.Service} Service + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Service.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Service message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy.Service + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Service.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + switch (message.name) { + default: + return "name: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.identity != null && message.hasOwnProperty("identity")) + if (!$util.isString(message.identity)) + return "identity: string expected"; + return null; + }; + + /** + * Creates a Service message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy.Service + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.Taxonomy.Service} Service + */ + Service.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.Taxonomy.Service) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.Taxonomy.Service(); + switch (object.name) { + default: + if (typeof object.name === "number") { + message.name = object.name; + break; + } + break; + case "MANAGING_SYSTEM_UNSPECIFIED": + case 0: + message.name = 0; + break; + case "MANAGING_SYSTEM_DATAPLEX": + case 1: + message.name = 1; + break; + case "MANAGING_SYSTEM_OTHER": + case 2: + message.name = 2; + break; + } + if (object.identity != null) + message.identity = String(object.identity); + return message; + }; + + /** + * Creates a plain object from a Service message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy.Service + * @static + * @param {google.cloud.datacatalog.v1beta1.Taxonomy.Service} message Service + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Service.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = options.enums === String ? "MANAGING_SYSTEM_UNSPECIFIED" : 0; + object.identity = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = options.enums === String ? $root.google.cloud.datacatalog.v1beta1.ManagingSystem[message.name] === undefined ? message.name : $root.google.cloud.datacatalog.v1beta1.ManagingSystem[message.name] : message.name; + if (message.identity != null && message.hasOwnProperty("identity")) + object.identity = message.identity; + return object; + }; + + /** + * Converts this Service to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy.Service + * @instance + * @returns {Object.} JSON object + */ + Service.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Service + * @function getTypeUrl + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy.Service + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Service.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.Taxonomy.Service"; + }; + + return Service; + })(); + + 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 + * @property {string|null} [filter] ListTaxonomiesRequest filter + */ + + /** + * 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 = ""; + + /** + * ListTaxonomiesRequest filter. + * @member {string} filter + * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest + * @instance + */ + ListTaxonomiesRequest.prototype.filter = ""; + + /** + * 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); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + 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; + } + case 4: { + message.filter = 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"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: 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); + if (object.filter != null) + message.filter = String(object.filter); + 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 = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this 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 + * @property {Array.|null} [activatedPolicyTypes] SerializedTaxonomy activatedPolicyTypes + */ + + /** + * 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 = []; + 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.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; + + /** + * SerializedTaxonomy activatedPolicyTypes. + * @member {Array.} activatedPolicyTypes + * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy + * @instance + */ + SerializedTaxonomy.prototype.activatedPolicyTypes = $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(); + 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.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; + } + 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.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; + } + } + 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.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]); + } + } + if (object.activatedPolicyTypes) { + if (!Array.isArray(object.activatedPolicyTypes)) + throw TypeError(".google.cloud.datacatalog.v1beta1.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.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 = []; + 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.v1beta1.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.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 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} [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.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 policyTag. + * @member {string} policyTag + * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag + * @instance + */ + SerializedPolicyTag.prototype.policyTag = ""; + + /** + * 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.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.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 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.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.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.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.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.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.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.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 = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + api.CommonLanguageSettings = (function() { + + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + */ + + /** + * Constructs a new CommonLanguageSettings. + * @memberof google.api + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings + * @constructor + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + */ + function CommonLanguageSettings(properties) { + this.destinations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.referenceDocsUri = ""; + + /** + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.destinations = $util.emptyArray; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @function create + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + */ + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); + }; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.referenceDocsUri = reader.string(); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonLanguageSettings message. + * @function verify + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonLanguageSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; + } + } + return null; + }; + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + */ + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) + return object; + var message = new $root.google.api.CommonLanguageSettings(); + if (object.referenceDocsUri != null) + message.referenceDocsUri = String(object.referenceDocsUri); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonLanguageSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) + object.referenceDocsUri = ""; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + } + return object; + }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; + + return CommonLanguageSettings; + })(); + + api.ClientLibrarySettings = (function() { + + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; + + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri + */ + + /** + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing + * @constructor + * @param {google.api.IPublishing=} [properties] Properties to set + */ + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.methodSettings = $util.emptyArray; + + /** + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; + + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; + + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; + + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; + + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; + + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; + + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; + + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + + /** + * Publishing restReferenceDocumentationUri. + * @member {string} restReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.restReferenceDocumentationUri = ""; + + /** + * Creates a new Publishing instance using the specified properties. + * @function create + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance + */ + Publishing.create = function create(properties) { + return new Publishing(properties); + }; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encode + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); + return writer; + }; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } + case 111: { + message.restReferenceDocumentationUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (!$util.isString(message.restReferenceDocumentationUri)) + return "restReferenceDocumentationUri: string expected"; + return null; + }; + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Publishing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Publishing} Publishing + */ + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) + return object; + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + if (object.restReferenceDocumentationUri != null) + message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); + return message; + }; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Publishing + * @static + * @param {google.api.Publishing} message Publishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; + object.restReferenceDocumentationUri = ""; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; + return object; + }; + + /** + * Converts this Publishing to JSON. + * @function toJSON + * @memberof google.api.Publishing + * @instance + * @returns {Object.} JSON object + */ + Publishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publishing + * @function getTypeUrl + * @memberof google.api.Publishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Publishing"; + }; + + return Publishing; + })(); + + api.JavaSettings = (function() { + + /** + * Properties of a JavaSettings. + * @memberof google.api + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + */ + + /** + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings + * @constructor + * @param {google.api.IJavaSettings=} [properties] Properties to set + */ + function JavaSettings(properties) { + this.serviceClassNames = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + */ + + /** + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings + * @constructor + * @param {google.api.IPythonSettings=} [properties] Properties to set + */ + function PythonSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; + + /** + * Creates a new PythonSettings instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance + */ + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSettings message. + * @function verify + * @memberof google.api.PythonSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings} PythonSettings + */ + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) + return object; + var message = new $root.google.api.PythonSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PythonSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings + * @static + * @param {google.api.PythonSettings} message PythonSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PythonSettings to JSON. + * @function toJSON + * @memberof google.api.PythonSettings + * @instance + * @returns {Object.} JSON object + */ + PythonSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSettings + * @function getTypeUrl + * @memberof google.api.PythonSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings"; + }; + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures + */ + + /** + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings + * @constructor + * @param {google.api.IDotnetSettings=} [properties] Properties to set + */ + function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; + + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; + + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; + + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @function create + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance + */ + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); + }; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encode + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) + for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); + if (message.ignoredResources != null && message.ignoredResources.length) + for (var i = 0; i < message.ignoredResources.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); + if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); + if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); + return writer; + }; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedServices[key] = value; + break; + } + case 3: { + if (message.renamedResources === $util.emptyObject) + message.renamedResources = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedResources[key] = value; + break; + } + case 4: { + if (!(message.ignoredResources && message.ignoredResources.length)) + message.ignoredResources = []; + message.ignoredResources.push(reader.string()); + break; + } + case 5: { + if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) + message.forcedNamespaceAliases = []; + message.forcedNamespaceAliases.push(reader.string()); + break; + } + case 6: { + if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) + message.handwrittenSignatures = []; + message.handwrittenSignatures.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { + if (!$util.isObject(message.renamedResources)) + return "renamedResources: object expected"; + var key = Object.keys(message.renamedResources); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedResources[key[i]])) + return "renamedResources: string{k:string} expected"; + } + if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { + if (!Array.isArray(message.ignoredResources)) + return "ignoredResources: array expected"; + for (var i = 0; i < message.ignoredResources.length; ++i) + if (!$util.isString(message.ignoredResources[i])) + return "ignoredResources: string[] expected"; + } + if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { + if (!Array.isArray(message.forcedNamespaceAliases)) + return "forcedNamespaceAliases: array expected"; + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + if (!$util.isString(message.forcedNamespaceAliases[i])) + return "forcedNamespaceAliases: string[] expected"; + } + if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { + if (!Array.isArray(message.handwrittenSignatures)) + return "handwrittenSignatures: array expected"; + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + if (!$util.isString(message.handwrittenSignatures[i])) + return "handwrittenSignatures: string[] expected"; + } + return null; + }; + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.DotnetSettings} DotnetSettings + */ + DotnetSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } + return message; + }; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.DotnetSettings} message DotnetSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DotnetSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } + return object; + }; + + /** + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings + * @instance + * @returns {Object.} JSON object + */ + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DotnetSettings + * @function getTypeUrl + * @memberof google.api.DotnetSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; + + return DotnetSettings; + })(); + + api.RubySettings = (function() { + + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ + + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + */ + + /** + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set + */ + function GoSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; + + /** + * Creates a new GoSettings instance using the specified properties. + * @function create + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance + */ + GoSettings.create = function create(properties) { + return new GoSettings(properties); + }; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encode + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoSettings message. + * @function verify + * @memberof google.api.GoSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.GoSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.GoSettings} GoSettings + */ + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) + return object; + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.GoSettings + * @static + * @param {google.api.GoSettings} message GoSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields + */ + + /** + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings + * @constructor + * @param {google.api.IMethodSettings=} [properties] Properties to set + */ + function MethodSettings(properties) { + this.autoPopulatedFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.selector = ""; + + /** + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.longRunning = null; + + /** + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance + */ + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); + }; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); + return writer; + }; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { + if (!Array.isArray(message.autoPopulatedFields)) + return "autoPopulatedFields: array expected"; + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + if (!$util.isString(message.autoPopulatedFields[i])) + return "autoPopulatedFields: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings} MethodSettings + */ + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) + return object; + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + if (object.autoPopulatedFields) { + if (!Array.isArray(object.autoPopulatedFields)) + throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); + message.autoPopulatedFields = []; + for (var i = 0; i < object.autoPopulatedFields.length; ++i) + message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings + * @static + * @param {google.api.MethodSettings} message MethodSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + if (message.autoPopulatedFields && message.autoPopulatedFields.length) { + object.autoPopulatedFields = []; + for (var j = 0; j < message.autoPopulatedFields.length; ++j) + object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; + } + return object; + }; + + /** + * Converts this MethodSettings to JSON. + * @function toJSON + * @memberof google.api.MethodSettings + * @instance + * @returns {Object.} JSON object + */ + MethodSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodSettings + * @function getTypeUrl + * @memberof google.api.MethodSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings"; + }; + + MethodSettings.LongRunning = (function() { + + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ + + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + * @property {number} SHOPPING=5 SHOPPING value + * @property {number} GEO=6 GEO value + * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value + */ + api.ClientLibraryOrganization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD"] = 1; + values[valuesById[2] = "ADS"] = 2; + values[valuesById[3] = "PHOTOS"] = 3; + values[valuesById[4] = "STREET_VIEW"] = 4; + values[valuesById[5] = "SHOPPING"] = 5; + values[valuesById[6] = "GEO"] = 6; + values[valuesById[7] = "GENERATIVE_AI"] = 7; + return values; + })(); + + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + api.ClientLibraryDestination = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; + values[valuesById[10] = "GITHUB"] = 10; + values[valuesById[20] = "PACKAGE_MANAGER"] = 20; + return values; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + * @property {number} IDENTIFIER=8 IDENTIFIER value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value + * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value + * @property {number} EDITION_2023=1000 EDITION_2023 value + * @property {number} EDITION_2024=1001 EDITION_2024 value + * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value + * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value + * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value + * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value + * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value + * @property {number} EDITION_MAX=2147483647 EDITION_MAX value + */ + protobuf.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[998] = "EDITION_PROTO2"] = 998; + values[valuesById[999] = "EDITION_PROTO3"] = 999; + values[valuesById[1000] = "EDITION_2023"] = 1000; + values[valuesById[1001] = "EDITION_2024"] = 1001; + values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; + values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; + values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; + values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; + values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; + values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; + return values; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = 0; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 14: { + message.edition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + this.declaration = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 3: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); + if (message.editionDefaults != null && message.editionDefaults.length) + for (var i = 0; i < message.editionDefaults.length; ++i) + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targets = []; + object.editionDefaults = []; + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.features = null; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; + } + if (message.editionDefaults && message.editionDefaults.length) { + object.editionDefaults = []; + for (var j = 0; j < message.editionDefaults.length; ++j) + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + + FieldOptions.EditionDefault = (function() { + + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ + + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + */ + EditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + return object; + var message = new $root.google.protobuf.FieldOptions.EditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this EditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + * @returns {Object.} JSON object + */ + EditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + }; + + return EditionDefault; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.features = null; + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.features = null; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * EnumOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.features = null; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.features = null; + + /** + * EnumValueOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.debugRedact = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.debugRedact = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object.debugRedact = false; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.features = null; + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * ServiceOptions .google.api.apiVersion. + * @member {string} .google.api.apiVersion + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.apiVersion"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + case 525000001: { + message[".google.api.apiVersion"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (!$util.isString(message[".google.api.apiVersion"])) + return ".google.api.apiVersion: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + if (object[".google.api.apiVersion"] != null) + message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + object[".google.api.apiVersion"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.features = null; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 35: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object.features = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.FeatureSet = (function() { + + /** + * Properties of a FeatureSet. + * @memberof google.protobuf + * @interface IFeatureSet + * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence + * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType + * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding + * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation + * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding + * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat + */ + + /** + * Constructs a new FeatureSet. + * @memberof google.protobuf + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet + * @constructor + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + */ + function FeatureSet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.fieldPresence = 0; + + /** + * FeatureSet enumType. + * @member {google.protobuf.FeatureSet.EnumType} enumType + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enumType = 0; + + /** + * FeatureSet repeatedFieldEncoding. + * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.repeatedFieldEncoding = 0; + + /** + * FeatureSet utf8Validation. + * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.utf8Validation = 0; + + /** + * FeatureSet messageEncoding. + * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.messageEncoding = 0; + + /** + * FeatureSet jsonFormat. + * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.jsonFormat = 0; + + /** + * Creates a new FeatureSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance + */ + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); + }; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); + return writer; + }; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fieldPresence = reader.int32(); + break; + } + case 2: { + message.enumType = reader.int32(); + break; + } + case 3: { + message.repeatedFieldEncoding = reader.int32(); + break; + } + case 4: { + message.utf8Validation = reader.int32(); + break; + } + case 5: { + message.messageEncoding = reader.int32(); + break; + } + case 6: { + message.jsonFormat = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSet message. + * @function verify + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + switch (message.fieldPresence) { + default: + return "fieldPresence: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enumType != null && message.hasOwnProperty("enumType")) + switch (message.enumType) { + default: + return "enumType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + switch (message.repeatedFieldEncoding) { + default: + return "repeatedFieldEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + switch (message.utf8Validation) { + default: + return "utf8Validation: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + switch (message.messageEncoding) { + default: + return "messageEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + switch (message.jsonFormat) { + default: + return "jsonFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet} FeatureSet + */ + FeatureSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet) + return object; + var message = new $root.google.protobuf.FeatureSet(); + switch (object.fieldPresence) { + default: + if (typeof object.fieldPresence === "number") { + message.fieldPresence = object.fieldPresence; + break; + } + break; + case "FIELD_PRESENCE_UNKNOWN": + case 0: + message.fieldPresence = 0; + break; + case "EXPLICIT": + case 1: + message.fieldPresence = 1; + break; + case "IMPLICIT": + case 2: + message.fieldPresence = 2; + break; + case "LEGACY_REQUIRED": + case 3: + message.fieldPresence = 3; + break; + } + switch (object.enumType) { + default: + if (typeof object.enumType === "number") { + message.enumType = object.enumType; + break; + } + break; + case "ENUM_TYPE_UNKNOWN": + case 0: + message.enumType = 0; + break; + case "OPEN": + case 1: + message.enumType = 1; + break; + case "CLOSED": + case 2: + message.enumType = 2; + break; + } + switch (object.repeatedFieldEncoding) { + default: + if (typeof object.repeatedFieldEncoding === "number") { + message.repeatedFieldEncoding = object.repeatedFieldEncoding; + break; + } + break; + case "REPEATED_FIELD_ENCODING_UNKNOWN": + case 0: + message.repeatedFieldEncoding = 0; + break; + case "PACKED": + case 1: + message.repeatedFieldEncoding = 1; + break; + case "EXPANDED": + case 2: + message.repeatedFieldEncoding = 2; + break; + } + switch (object.utf8Validation) { + default: + if (typeof object.utf8Validation === "number") { + message.utf8Validation = object.utf8Validation; + break; + } + break; + case "UTF8_VALIDATION_UNKNOWN": + case 0: + message.utf8Validation = 0; + break; + case "VERIFY": + case 2: + message.utf8Validation = 2; + break; + case "NONE": + case 3: + message.utf8Validation = 3; + break; + } + switch (object.messageEncoding) { + default: + if (typeof object.messageEncoding === "number") { + message.messageEncoding = object.messageEncoding; + break; + } + break; + case "MESSAGE_ENCODING_UNKNOWN": + case 0: + message.messageEncoding = 0; + break; + case "LENGTH_PREFIXED": + case 1: + message.messageEncoding = 1; + break; + case "DELIMITED": + case 2: + message.messageEncoding = 2; + break; + } + switch (object.jsonFormat) { + default: + if (typeof object.jsonFormat === "number") { + message.jsonFormat = object.jsonFormat; + break; + } + break; + case "JSON_FORMAT_UNKNOWN": + case 0: + message.jsonFormat = 0; + break; + case "ALLOW": + case 1: + message.jsonFormat = 1; + break; + case "LEGACY_BEST_EFFORT": + case 2: + message.jsonFormat = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.FeatureSet} message FeatureSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; + object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; + object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; + object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; + object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; + object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; + } + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; + if (message.enumType != null && message.hasOwnProperty("enumType")) + object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; + return object; + }; + + /** + * Converts this FeatureSet to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet + * @instance + * @returns {Object.} JSON object + */ + FeatureSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSet + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet"; + }; + + /** + * FieldPresence enum. + * @name google.protobuf.FeatureSet.FieldPresence + * @enum {number} + * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value + * @property {number} EXPLICIT=1 EXPLICIT value + * @property {number} IMPLICIT=2 IMPLICIT value + * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value + */ + FeatureSet.FieldPresence = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; + values[valuesById[1] = "EXPLICIT"] = 1; + values[valuesById[2] = "IMPLICIT"] = 2; + values[valuesById[3] = "LEGACY_REQUIRED"] = 3; + return values; + })(); + + /** + * EnumType enum. + * @name google.protobuf.FeatureSet.EnumType + * @enum {number} + * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value + * @property {number} OPEN=1 OPEN value + * @property {number} CLOSED=2 CLOSED value + */ + FeatureSet.EnumType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "OPEN"] = 1; + values[valuesById[2] = "CLOSED"] = 2; + return values; + })(); + + /** + * RepeatedFieldEncoding enum. + * @name google.protobuf.FeatureSet.RepeatedFieldEncoding + * @enum {number} + * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value + * @property {number} PACKED=1 PACKED value + * @property {number} EXPANDED=2 EXPANDED value + */ + FeatureSet.RepeatedFieldEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "PACKED"] = 1; + values[valuesById[2] = "EXPANDED"] = 2; + return values; + })(); + + /** + * Utf8Validation enum. + * @name google.protobuf.FeatureSet.Utf8Validation + * @enum {number} + * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value + * @property {number} VERIFY=2 VERIFY value + * @property {number} NONE=3 NONE value + */ + FeatureSet.Utf8Validation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; + values[valuesById[2] = "VERIFY"] = 2; + values[valuesById[3] = "NONE"] = 3; + return values; + })(); + + /** + * MessageEncoding enum. + * @name google.protobuf.FeatureSet.MessageEncoding + * @enum {number} + * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value + * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value + * @property {number} DELIMITED=2 DELIMITED value + */ + FeatureSet.MessageEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "LENGTH_PREFIXED"] = 1; + values[valuesById[2] = "DELIMITED"] = 2; + return values; + })(); + + /** + * JsonFormat enum. + * @name google.protobuf.FeatureSet.JsonFormat + * @enum {number} + * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value + * @property {number} ALLOW=1 ALLOW value + * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value + */ + FeatureSet.JsonFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; + values[valuesById[1] = "ALLOW"] = 1; + values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; + return values; + })(); + + return FeatureSet; + })(); + + protobuf.FeatureSetDefaults = (function() { + + /** + * Properties of a FeatureSetDefaults. + * @memberof google.protobuf + * @interface IFeatureSetDefaults + * @property {Array.|null} [defaults] FeatureSetDefaults defaults + * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition + * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition + */ + + /** + * Constructs a new FeatureSetDefaults. + * @memberof google.protobuf + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults + * @constructor + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + */ + function FeatureSetDefaults(properties) { + this.defaults = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.defaults = $util.emptyArray; + + /** + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.minimumEdition = 0; + + /** + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.maximumEdition = 0; + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + */ + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); + }; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaults != null && message.defaults.length) + for (var i = 0; i < message.defaults.length; ++i) + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); + return writer; + }; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetDefaults message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (!Array.isArray(message.defaults)) + return "defaults: array expected"; + for (var i = 0; i < message.defaults.length; ++i) { + var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); + if (error) + return "defaults." + error; + } + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + switch (message.maximumEdition) { + default: + return "maximumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + */ + FeatureSetDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults(); + if (object.defaults) { + if (!Array.isArray(object.defaults)) + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); + message.defaults = []; + for (var i = 0; i < object.defaults.length; ++i) { + if (typeof object.defaults[i] !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); + message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); + } + } + switch (object.minimumEdition) { + default: + if (typeof object.minimumEdition === "number") { + message.minimumEdition = object.minimumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.minimumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.minimumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.minimumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.minimumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.minimumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.minimumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.minimumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.minimumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.minimumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.minimumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.minimumEdition = 2147483647; + break; + } + switch (object.maximumEdition) { + default: + if (typeof object.maximumEdition === "number") { + message.maximumEdition = object.maximumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.maximumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.maximumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.maximumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.maximumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.maximumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.maximumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.maximumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.maximumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.maximumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.maximumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.maximumEdition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.defaults = []; + if (options.defaults) { + object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.defaults && message.defaults.length) { + object.defaults = []; + for (var j = 0; j < message.defaults.length; ++j) + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; + return object; + }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults + * @instance + * @returns {Object.} JSON object + */ + FeatureSetDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetDefaults + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; + }; + + FeatureSetDefaults.FeatureSetEditionDefault = (function() { + + /** + * Properties of a FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @interface IFeatureSetEditionDefault + * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition + * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + */ + + /** + * Constructs a new FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @classdesc Represents a FeatureSetEditionDefault. + * @implements IFeatureSetEditionDefault + * @constructor + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + */ + function FeatureSetEditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; + + /** + * FeatureSetEditionDefault features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.features = null; + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance + */ + FeatureSetEditionDefault.create = function create(properties) { + return new FeatureSetEditionDefault(properties); + }; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetEditionDefault message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetEditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + return null; + }; + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + */ + FeatureSetEditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetEditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.features = null; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + * @returns {Object.} JSON object + */ + FeatureSetEditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; + }; + + return FeatureSetEditionDefault; + })(); + + return FeatureSetDefaults; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + protobuf.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/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/protos.json b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/protos.json new file mode 100644 index 00000000000..82e0997c2b7 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/protos.json @@ -0,0 +1,4750 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "datacatalog": { + "nested": { + "v1beta1": { + "options": { + "csharp_namespace": "Google.Cloud.DataCatalog.V1Beta1", + "go_package": "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb", + "java_multiple_files": true, + "java_package": "com.google.cloud.datacatalog.v1beta1", + "php_namespace": "Google\\Cloud\\DataCatalog\\V1beta1", + "ruby_package": "Google::Cloud::DataCatalog::V1beta1", + "(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}", + "java_outer_classname": "PolicyTagManagerSerializationProto" + }, + "nested": { + "IntegratedSystem": { + "values": { + "INTEGRATED_SYSTEM_UNSPECIFIED": 0, + "BIGQUERY": 1, + "CLOUD_PUBSUB": 2 + } + }, + "ManagingSystem": { + "values": { + "MANAGING_SYSTEM_UNSPECIFIED": 0, + "MANAGING_SYSTEM_DATAPLEX": 1, + "MANAGING_SYSTEM_OTHER": 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" + } + ] + }, + "RenameTagTemplateFieldEnumValue": { + "requestType": "RenameTagTemplateFieldEnumValueRequest", + "responseType": "TagTemplateField", + "options": { + "(google.api.http).post": "/v1beta1/{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": "/v1beta1/{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": "/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)": "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" + } + } + } + } + } + }, + "SearchCatalogResponse": { + "fields": { + "results": { + "rule": "repeated", + "type": "SearchCatalogResult", + "id": 1 + }, + "totalSize": { + "type": "int32", + "id": 2 + }, + "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" + ] + } + }, + "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.field_behavior)": "IDENTIFIER", + "(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" + } + }, + "usageSignal": { + "type": "UsageSignal", + "id": 13, + "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, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "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 + } + } + }, + "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 + }, + "modifyTime": { + "type": "google.protobuf.Timestamp", + "id": 7 + } + } + }, + "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" + } + } + } + }, + "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, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "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, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "displayName": { + "type": "string", + "id": 2 + }, + "fields": { + "keyType": "string", + "type": "TagTemplateField", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dataplexTransferStatus": { + "type": "DataplexTransferStatus", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "DataplexTransferStatus": { + "valuesOptions": { + "MIGRATED": { + "deprecated": true + } + }, + "values": { + "DATAPLEX_TRANSFER_STATUS_UNSPECIFIED": 0, + "MIGRATED": 1 + } + } + } + }, + "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 + } + }, + "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 + } + } + }, + "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)": "IDENTIFIER" + } + }, + "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" + } + }, + "service": { + "type": "Service", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "PolicyType": { + "values": { + "POLICY_TYPE_UNSPECIFIED": 0, + "FINE_GRAINED_ACCESS_CONTROL": 1 + } + }, + "Service": { + "fields": { + "name": { + "type": "ManagingSystem", + "id": 1 + }, + "identity": { + "type": "string", + "id": 2 + } + } + } + } + }, + "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)": "IDENTIFIER" + } + }, + "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 + }, + "filter": { + "type": "string", + "id": 4 + } + } + }, + "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 + }, + "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 + } + } + }, + "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": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "apiVersion": { + "type": "string", + "id": 525000001, + "extend": "google.protobuf.ServiceOptions" + }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 + }, + "restReferenceDocumentationUri": { + "type": "string", + "id": 111 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "renamedResources": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "ignoredResources": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "forcedNamespaceAliases": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "handwrittenSignatures": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + }, + "autoPopulatedFields": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "LongRunning": { + "fields": { + "initialPollDelay": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "pollDelayMultiplier": { + "type": "float", + "id": 2 + }, + "maxPollDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "totalPollTimeout": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + } + } + }, + "ClientLibraryOrganization": { + "values": { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4, + "SHOPPING": 5, + "GEO": 6, + "GENERATIVE_AI": 7 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "Edition": { + "values": { + "EDITION_UNKNOWN": 0, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_2024": 1001, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + "EDITION_MAX": 2147483647 + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "declaration": { + "rule": "repeated", + "type": "Declaration", + "id": 2, + "options": { + "retention": "RETENTION_SOURCE" + } + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "verification": { + "type": "VerificationState", + "id": 3, + "options": { + "default": "UNVERIFIED", + "retention": "RETENTION_SOURCE" + } + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "Declaration": { + "fields": { + "number": { + "type": "int32", + "id": 1 + }, + "fullName": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "reserved": { + "type": "bool", + "id": 5 + }, + "repeated": { + "type": "bool", + "id": 6 + } + }, + "reserved": [ + [ + 4, + 4 + ] + ] + }, + "VerificationState": { + "values": { + "DECLARATION": 0, + "UNVERIFIED": 1 + } + } + } + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REPEATED": 3, + "LABEL_REQUIRED": 2 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 42, + 42 + ], + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 12 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "targets": { + "rule": "repeated", + "type": "OptionTargetType", + "id": 19, + "options": { + "packed": false + } + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 18, + 18 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + }, + "OptionRetention": { + "values": { + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2 + } + }, + "OptionTargetType": { + "values": { + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9 + } + }, + "EditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "value": { + "type": "string", + "id": 2 + } + } + } + } + }, + "OneofOptions": { + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "features": { + "type": "FeatureSet", + "id": 34 + }, + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "features": { + "type": "FeatureSet", + "id": 35 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "FeatureSet": { + "fields": { + "fieldPresence": { + "type": "FieldPresence", + "id": 1, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_2023", + "edition_defaults.value": "EXPLICIT" + } + }, + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "OPEN" + } + }, + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "PACKED" + } + }, + "utf8Validation": { + "type": "Utf8Validation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" + } + }, + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO2", + "edition_defaults.value": "LENGTH_PREFIXED" + } + }, + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "ALLOW" + } + } + }, + "extensions": [ + [ + 1000, + 1000 + ], + [ + 1001, + 1001 + ], + [ + 1002, + 1002 + ], + [ + 9990, + 9990 + ], + [ + 9995, + 9999 + ], + [ + 10000, + 10000 + ] + ], + "reserved": [ + [ + 999, + 999 + ] + ], + "nested": { + "FieldPresence": { + "values": { + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3 + } + }, + "EnumType": { + "values": { + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2 + } + }, + "RepeatedFieldEncoding": { + "values": { + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2 + } + }, + "Utf8Validation": { + "values": { + "UTF8_VALIDATION_UNKNOWN": 0, + "VERIFY": 2, + "NONE": 3 + } + }, + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } + }, + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } + } + } + }, + "FeatureSetDefaults": { + "fields": { + "defaults": { + "rule": "repeated", + "type": "FeatureSetEditionDefault", + "id": 1 + }, + "minimumEdition": { + "type": "Edition", + "id": 4 + }, + "maximumEdition": { + "type": "Edition", + "id": 5 + } + }, + "nested": { + "FeatureSetEditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "features": { + "type": "FeatureSet", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "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": "cloud.google.com/go/iam/apiv1/iampb;iampb", + "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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_entry.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_entry.js new file mode 100644 index 00000000000..c650a5f065b --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_entry.js @@ -0,0 +1,74 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_entry_group.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_entry_group.js new file mode 100644 index 00000000000..9607f0deaea --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_entry_group.js @@ -0,0 +1,75 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_tag.js new file mode 100644 index 00000000000..ca8b5d7ffe3 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_tag.js @@ -0,0 +1,71 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_tag_template.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_tag_template.js new file mode 100644 index 00000000000..c1228c483ea --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_tag_template.js @@ -0,0 +1,74 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_tag_template_field.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_tag_template_field.js new file mode 100644 index 00000000000..af342a92959 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_tag_template_field.js @@ -0,0 +1,78 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_entry.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_entry.js new file mode 100644 index 00000000000..0775e3d7a75 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_entry.js @@ -0,0 +1,62 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_entry_group.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_entry_group.js new file mode 100644 index 00000000000..30b89cb6ab6 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_entry_group.js @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_tag.js new file mode 100644 index 00000000000..5159affd655 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_tag.js @@ -0,0 +1,62 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_tag_template.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_tag_template.js new file mode 100644 index 00000000000..9ac0024b35e --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_tag_template.js @@ -0,0 +1,69 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_tag_template_field.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_tag_template_field.js new file mode 100644 index 00000000000..4c01eca2607 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_tag_template_field.js @@ -0,0 +1,69 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_entry.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_entry.js new file mode 100644 index 00000000000..3ce1b1a3a2d --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_entry.js @@ -0,0 +1,62 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_entry_group.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_entry_group.js new file mode 100644 index 00000000000..d97a561feac --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_entry_group.js @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_iam_policy.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_iam_policy.js new file mode 100644 index 00000000000..e1e85568589 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_iam_policy.js @@ -0,0 +1,67 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_tag_template.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_tag_template.js new file mode 100644 index 00000000000..f877efc7b97 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_tag_template.js @@ -0,0 +1,62 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.list_entries.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.list_entries.js new file mode 100644 index 00000000000..fa7c1919aa5 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.list_entries.js @@ -0,0 +1,82 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 = 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.list_entry_groups.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.list_entry_groups.js new file mode 100644 index 00000000000..b42b99d7376 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.list_entry_groups.js @@ -0,0 +1,75 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 = 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.list_tags.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.list_tags.js new file mode 100644 index 00000000000..e855345fcc1 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.list_tags.js @@ -0,0 +1,77 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 = 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.lookup_entry.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.lookup_entry.js new file mode 100644 index 00000000000..e6141fe9c96 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.lookup_entry.js @@ -0,0 +1,78 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 should 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.rename_tag_template_field.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.rename_tag_template_field.js new file mode 100644 index 00000000000..338edd31bf9 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.rename_tag_template_field.js @@ -0,0 +1,68 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.rename_tag_template_field_enum_value.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.rename_tag_template_field_enum_value.js new file mode 100644 index 00000000000..5c137b55e76 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.rename_tag_template_field_enum_value.js @@ -0,0 +1,68 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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_v1beta1_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. Example: + * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name} + */ + // 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').v1beta1; + + // 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_v1beta1_generated_DataCatalog_RenameTagTemplateFieldEnumValue_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.search_catalog.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.search_catalog.js new file mode 100644 index 00000000000..2548878b3e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.search_catalog.js @@ -0,0 +1,103 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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_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 = {} + /** + * Optional. The query string in search query syntax. An empty query string + * will result in all data assets (in the specified scope) that the user has + * access to. 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 + * * `default` that can only be descending + * 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, + }; + + // Run request + const iterable = 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.set_iam_policy.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.set_iam_policy.js new file mode 100644 index 00000000000..c6ecac8ae00 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.set_iam_policy.js @@ -0,0 +1,77 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.test_iam_permissions.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.test_iam_permissions.js new file mode 100644 index 00000000000..cab032a6a1e --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.test_iam_permissions.js @@ -0,0 +1,70 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 = ['abc','def'] + + // 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_entry.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_entry.js new file mode 100644 index 00000000000..7b21df8f4e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_entry.js @@ -0,0 +1,85 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 = {} + /** + * 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. + * 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_entry_group.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_entry_group.js new file mode 100644 index 00000000000..b1eb06086e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_entry_group.js @@ -0,0 +1,68 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 = {} + /** + * 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').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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_tag.js new file mode 100644 index 00000000000..99e5cd81f42 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_tag.js @@ -0,0 +1,70 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 = {} + /** + * Note: Currently, this parameter can only take `"fields"` as value. + * 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').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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_tag_template.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_tag_template.js new file mode 100644 index 00000000000..072e439f100 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_tag_template.js @@ -0,0 +1,69 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 = {} + /** + * Names of fields whose values to overwrite on a tag template. Currently, + * only `display_name` can be overwritten. + * 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').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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_tag_template_field.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_tag_template_field.js new file mode 100644 index 00000000000..7fdb67bfed3 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_tag_template_field.js @@ -0,0 +1,83 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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. 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').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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.create_policy_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.create_policy_tag.js new file mode 100644 index 00000000000..577306dd22c --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.create_policy_tag.js @@ -0,0 +1,65 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.create_taxonomy.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.create_taxonomy.js new file mode 100644 index 00000000000..0f32ff0c27d --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.create_taxonomy.js @@ -0,0 +1,65 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.delete_policy_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.delete_policy_tag.js new file mode 100644 index 00000000000..97c2bd93afd --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.delete_policy_tag.js @@ -0,0 +1,62 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.delete_taxonomy.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.delete_taxonomy.js new file mode 100644 index 00000000000..ba621996403 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.delete_taxonomy.js @@ -0,0 +1,62 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.get_iam_policy.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.get_iam_policy.js new file mode 100644 index 00000000000..1e35319820d --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.get_iam_policy.js @@ -0,0 +1,67 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.get_policy_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.get_policy_tag.js new file mode 100644 index 00000000000..392dd2ee393 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.get_policy_tag.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.get_taxonomy.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.get_taxonomy.js new file mode 100644 index 00000000000..46696656f3a --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.get_taxonomy.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.list_policy_tags.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.list_policy_tags.js new file mode 100644 index 00000000000..f8c815aa3b0 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.list_policy_tags.js @@ -0,0 +1,73 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 = 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.list_taxonomies.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.list_taxonomies.js new file mode 100644 index 00000000000..2455e4e2810 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.list_taxonomies.js @@ -0,0 +1,78 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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' + /** + * Supported field for filter is 'service' and value is 'dataplex'. + * Eg: service=dataplex. + */ + // const filter = '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 = 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.set_iam_policy.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.set_iam_policy.js new file mode 100644 index 00000000000..953c675deab --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.set_iam_policy.js @@ -0,0 +1,77 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.test_iam_permissions.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.test_iam_permissions.js new file mode 100644 index 00000000000..54e71429d31 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.test_iam_permissions.js @@ -0,0 +1,70 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 = ['abc','def'] + + // 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.update_policy_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.update_policy_tag.js new file mode 100644 index 00000000000..65268b27ccc --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.update_policy_tag.js @@ -0,0 +1,71 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.update_taxonomy.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.update_taxonomy.js new file mode 100644 index 00000000000..36c3177c91a --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.update_taxonomy.js @@ -0,0 +1,68 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager_serialization.export_taxonomies.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager_serialization.export_taxonomies.js new file mode 100644 index 00000000000..591a96d88cd --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager_serialization.export_taxonomies.js @@ -0,0 +1,71 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 = ['abc','def'] + /** + * 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager_serialization.import_taxonomies.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager_serialization.import_taxonomies.js new file mode 100644 index 00000000000..aa16e1e8222 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager_serialization.import_taxonomies.js @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 imported taxonomies will belong + * to. + */ + // const parent = 'abc123' + /** + * Inline source used for taxonomies to be imported. + */ + // 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.datacatalog.v1beta1.json b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.datacatalog.v1beta1.json new file mode 100644 index 00000000000..5b339ed9fca --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.datacatalog.v1beta1.json @@ -0,0 +1,1947 @@ +{ + "clientLibrary": { + "name": "nodejs-datacatalog", + "version": "0.1.0", + "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 subsequently 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": 95, + "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": 60, + "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": 77, + "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": 61, + "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": 75, + "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": 60, + "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_RenameTagTemplateFieldEnumValue_async", + "title": "DataCatalog renameTagTemplateFieldEnumValue Sample", + "origin": "API_DEFINITION", + "description": " Renames an enum value in a tag template. The enum values have to be unique within one enum field. Thus, an enum value cannot be renamed with a name used in any other enum value within the same enum field.", + "canonical": true, + "file": "data_catalog.rename_tag_template_field_enum_value.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RenameTagTemplateFieldEnumValue", + "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.RenameTagTemplateFieldEnumValue", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "new_enum_value_display_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.datacatalog.v1beta1.TagTemplateField", + "client": { + "shortName": "DataCatalogClient", + "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" + }, + "method": { + "shortName": "RenameTagTemplateFieldEnumValue", + "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.RenameTagTemplateFieldEnumValue", + "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": 63, + "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": 62, + "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 tags assigned to an [Entry][google.cloud.datacatalog.v1beta1.Entry]. The [columns][google.cloud.datacatalog.v1beta1.Tag.column] in the response are lowercased.", + "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": 70, + "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" + }, + { + "name": "filter", + "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" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/index.ts b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/index.ts new file mode 100644 index 00000000000..bba445a5bbd --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/index.ts @@ -0,0 +1,29 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as v1beta1 from './v1beta1'; +const DataCatalogClient = v1beta1.DataCatalogClient; +type DataCatalogClient = v1beta1.DataCatalogClient; +const PolicyTagManagerClient = v1beta1.PolicyTagManagerClient; +type PolicyTagManagerClient = v1beta1.PolicyTagManagerClient; +const PolicyTagManagerSerializationClient = v1beta1.PolicyTagManagerSerializationClient; +type PolicyTagManagerSerializationClient = v1beta1.PolicyTagManagerSerializationClient; +export {v1beta1, DataCatalogClient, PolicyTagManagerClient, PolicyTagManagerSerializationClient}; +export default {v1beta1, DataCatalogClient, PolicyTagManagerClient, PolicyTagManagerSerializationClient}; +import * as protos from '../protos/protos'; +export {protos} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/data_catalog_client.ts b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/data_catalog_client.ts new file mode 100644 index 00000000000..e08cbca6f44 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/data_catalog_client.ts @@ -0,0 +1,3761 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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}; + private _universeDomain: string; + private _servicePath: string; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + 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} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new DataCatalogClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof DataCatalogClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'datacatalog.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + 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.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', 'renameTagTemplateFieldEnumValue', '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. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'datacatalog.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'datacatalog.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * 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 {@link protos.google.cloud.datacatalog.v1beta1.EntryGroup|EntryGroup}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 + * 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 {@link protos.google.cloud.datacatalog.v1beta1.EntryGroup|EntryGroup}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.EntryGroup|EntryGroup}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.Entry|Entry}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 + * 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. + * + * 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 {@link protos.google.cloud.datacatalog.v1beta1.Entry|Entry}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 protos.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 {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.Entry|Entry}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 should 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 {@link protos.google.cloud.datacatalog.v1beta1.Entry|Entry}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.TagTemplate|TagTemplate}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.TagTemplate|TagTemplate}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 + * Names of fields whose values to overwrite on a tag template. Currently, + * only `display_name` can be overwritten. + * + * 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 {@link protos.google.cloud.datacatalog.v1beta1.TagTemplate|TagTemplate}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.TagTemplateField|TagTemplateField}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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. 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 {@link protos.google.cloud.datacatalog.v1beta1.TagTemplateField|TagTemplateField}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.TagTemplateField|TagTemplateField}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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); + } +/** + * Renames an enum value in a tag template. The enum values have to be unique + * within one enum field. Thus, an enum value cannot be renamed with a name + * used in any other enum value within the same enum field. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the enum field value. Example: + * + * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name} + * @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 {@link protos.google.cloud.datacatalog.v1beta1.TagTemplateField|TagTemplateField}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/data_catalog.rename_tag_template_field_enum_value.js + * region_tag:datacatalog_v1beta1_generated_DataCatalog_RenameTagTemplateFieldEnumValue_async + */ + renameTagTemplateFieldEnumValue( + request?: protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldEnumValueRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, + protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldEnumValueRequest|undefined, {}|undefined + ]>; + renameTagTemplateFieldEnumValue( + request: protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldEnumValueRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, + protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldEnumValueRequest|null|undefined, + {}|null|undefined>): void; + renameTagTemplateFieldEnumValue( + request: protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldEnumValueRequest, + callback: Callback< + protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, + protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldEnumValueRequest|null|undefined, + {}|null|undefined>): void; + renameTagTemplateFieldEnumValue( + request?: protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldEnumValueRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, + protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldEnumValueRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, + protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldEnumValueRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, + protos.google.cloud.datacatalog.v1beta1.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 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 {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 protos.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 {@link protos.google.cloud.datacatalog.v1beta1.Tag|Tag}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 + * Note: Currently, this parameter can only take `"fields"` as value. + * + * 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 {@link protos.google.cloud.datacatalog.v1beta1.Tag|Tag}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.iam.v1.Policy|Policy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.iam.v1.Policy|Policy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.iam.v1.TestIamPermissionsResponse|TestIamPermissionsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 subsequently 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] + * Optional. The query string in search query syntax. An empty query string + * will result in all data assets (in the specified scope) that the user has + * access to. 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 protos.google.cloud.datacatalog.v1beta1.SearchCatalogResponse.next_page_token|SearchCatalogResponse.next_page_token}, + * which indicates that this is a continuation of a prior + * {@link protos.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 + * * `default` that can only be descending + * + * 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 {@link protos.google.cloud.datacatalog.v1beta1.SearchCatalogResult|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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] + * Optional. The query string in search query syntax. An empty query string + * will result in all data assets (in the specified scope) that the user has + * access to. 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 protos.google.cloud.datacatalog.v1beta1.SearchCatalogResponse.next_page_token|SearchCatalogResponse.next_page_token}, + * which indicates that this is a continuation of a prior + * {@link protos.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 + * * `default` that can only be descending + * + * 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 {@link protos.google.cloud.datacatalog.v1beta1.SearchCatalogResult|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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] + * Optional. The query string in search query syntax. An empty query string + * will result in all data assets (in the specified scope) that the user has + * access to. 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 protos.google.cloud.datacatalog.v1beta1.SearchCatalogResponse.next_page_token|SearchCatalogResponse.next_page_token}, + * which indicates that this is a continuation of a prior + * {@link protos.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 + * * `default` that can only be descending + * + * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.datacatalog.v1beta1.SearchCatalogResult|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.EntryGroup|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 {@link protos.google.cloud.datacatalog.v1beta1.EntryGroup|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.datacatalog.v1beta1.EntryGroup|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.Entry|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 {@link protos.google.cloud.datacatalog.v1beta1.Entry|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.datacatalog.v1beta1.Entry|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 tags assigned to an {@link protos.google.cloud.datacatalog.v1beta1.Entry|Entry}. + * The {@link protos.google.cloud.datacatalog.v1beta1.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 could be an {@link protos.google.cloud.datacatalog.v1beta1.Entry|Entry} or an + * {@link protos.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 {@link protos.google.cloud.datacatalog.v1beta1.Tag|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 protos.google.cloud.datacatalog.v1beta1.Entry|Entry} or an + * {@link protos.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 {@link protos.google.cloud.datacatalog.v1beta1.Tag|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 protos.google.cloud.datacatalog.v1beta1.Entry|Entry} or an + * {@link protos.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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.datacatalog.v1beta1.Tag|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/data_catalog_client_config.json b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/data_catalog_client_config.json new file mode 100644 index 00000000000..302d766c2f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/data_catalog_client_config.json @@ -0,0 +1,171 @@ +{ + "interfaces": { + "google.cloud.datacatalog.v1beta1.DataCatalog": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "resource_exhausted_internal_unavailable": [ + "RESOURCE_EXHAUSTED", + "INTERNAL", + "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": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "CreateEntryGroup": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "UpdateEntryGroup": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "GetEntryGroup": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "DeleteEntryGroup": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "ListEntryGroups": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "CreateEntry": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "UpdateEntry": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "DeleteEntry": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "GetEntry": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "LookupEntry": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "ListEntries": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "CreateTagTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "GetTagTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "UpdateTagTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "DeleteTagTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "CreateTagTemplateField": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "UpdateTagTemplateField": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "RenameTagTemplateField": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "RenameTagTemplateFieldEnumValue": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "DeleteTagTemplateField": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "CreateTag": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "UpdateTag": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "DeleteTag": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "ListTags": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_internal_unavailable", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/data_catalog_proto_list.json b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/data_catalog_proto_list.json new file mode 100644 index 00000000000..87fadef68ad --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/data_catalog_proto_list.json @@ -0,0 +1,13 @@ +[ + "../../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", + "../../protos/google/cloud/datacatalog/v1beta1/usage.proto" +] diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/gapic_metadata.json new file mode 100644 index 00000000000..2cbf4fc5833 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/gapic_metadata.json @@ -0,0 +1,505 @@ +{ + "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" + ] + }, + "RenameTagTemplateFieldEnumValue": { + "methods": [ + "renameTagTemplateFieldEnumValue" + ] + }, + "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" + ] + }, + "RenameTagTemplateFieldEnumValue": { + "methods": [ + "renameTagTemplateFieldEnumValue" + ] + }, + "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/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/index.ts b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/index.ts new file mode 100644 index 00000000000..a6998a86c14 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/index.ts @@ -0,0 +1,21 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_client.ts b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_client.ts new file mode 100644 index 00000000000..c048bfdf1fa --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_client.ts @@ -0,0 +1,2024 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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}; + private _universeDomain: string; + private _servicePath: string; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + 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} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new PolicyTagManagerClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof PolicyTagManagerClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'datacatalog.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + 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. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'datacatalog.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'datacatalog.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * 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 {@link protos.google.cloud.datacatalog.v1beta1.Taxonomy|Taxonomy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.Taxonomy|Taxonomy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.Taxonomy|Taxonomy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.PolicyTag|PolicyTag}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.PolicyTag|PolicyTag}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.PolicyTag|PolicyTag}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.iam.v1.Policy|Policy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.iam.v1.Policy|Policy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.iam.v1.TestIamPermissionsResponse|TestIamPermissionsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {string} request.filter + * Supported field for filter is 'service' and value is 'dataplex'. + * Eg: service=dataplex. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.datacatalog.v1beta1.Taxonomy|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 {string} request.filter + * Supported field for filter is 'service' and value is 'dataplex'. + * Eg: service=dataplex. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.datacatalog.v1beta1.Taxonomy|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 {string} request.filter + * Supported field for filter is 'service' and value is 'dataplex'. + * Eg: service=dataplex. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.datacatalog.v1beta1.Taxonomy|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.PolicyTag|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 {@link protos.google.cloud.datacatalog.v1beta1.PolicyTag|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.datacatalog.v1beta1.PolicyTag|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_client_config.json b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_client_config.json new file mode 100644 index 00000000000..3ebe249a141 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_client_config.json @@ -0,0 +1,91 @@ +{ + "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": { + "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/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_proto_list.json b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_proto_list.json new file mode 100644 index 00000000000..87fadef68ad --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_proto_list.json @@ -0,0 +1,13 @@ +[ + "../../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", + "../../protos/google/cloud/datacatalog/v1beta1/usage.proto" +] diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_serialization_client.ts b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_serialization_client.ts new file mode 100644 index 00000000000..89d08b067b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_serialization_client.ts @@ -0,0 +1,991 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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}; + private _universeDomain: string; + private _servicePath: string; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + 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} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new PolicyTagManagerSerializationClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof PolicyTagManagerSerializationClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'datacatalog.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + 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. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'datacatalog.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'datacatalog.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * 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 imported taxonomies will belong + * to. + * @param {google.cloud.datacatalog.v1beta1.InlineSource} request.inlineSource + * Inline source used for taxonomies to be imported. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse|ImportTaxonomiesResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse|ExportTaxonomiesResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/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/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_serialization_client_config.json b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_serialization_client_config.json new file mode 100644 index 00000000000..0c5cc695aeb --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_serialization_client_config.json @@ -0,0 +1,36 @@ +{ + "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": { + "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/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_serialization_proto_list.json b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_serialization_proto_list.json new file mode 100644 index 00000000000..87fadef68ad --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_serialization_proto_list.json @@ -0,0 +1,13 @@ +[ + "../../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", + "../../protos/google/cloud/datacatalog/v1beta1/usage.proto" +] diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..5b474f9796d --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/system-test/fixtures/sample/src/index.js @@ -0,0 +1,29 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-datacatalog/v1beta1/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..4c012b3d052 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,44 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/system-test/install.ts b/owl-bot-staging/google-cloud-datacatalog/v1beta1/system-test/install.ts new file mode 100644 index 00000000000..2a505d6df0c --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + + it('TypeScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() + } + }; + await packNTest(options); + }); + + it('JavaScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + } + }; + await packNTest(options); + }); + +}); diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/test/gapic_data_catalog_v1beta1.ts b/owl-bot-staging/google-cloud-datacatalog/v1beta1/test/gapic_data_catalog_v1beta1.ts new file mode 100644 index 00000000000..2cdcc30ed25 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/test/gapic_data_catalog_v1beta1.ts @@ -0,0 +1,4241 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 apiEndpoint', () => { + const client = new datacatalogModule.v1beta1.DataCatalogClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new datacatalogModule.v1beta1.DataCatalogClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = datacatalogModule.v1beta1.DataCatalogClient.servicePath; + assert.strictEqual(servicePath, 'datacatalog.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = datacatalogModule.v1beta1.DataCatalogClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new datacatalogModule.v1beta1.DataCatalogClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datacatalog.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new datacatalogModule.v1beta1.DataCatalogClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datacatalog.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new datacatalogModule.v1beta1.DataCatalogClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datacatalog.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new datacatalogModule.v1beta1.DataCatalogClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datacatalog.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new datacatalogModule.v1beta1.DataCatalogClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + 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('renameTagTemplateFieldEnumValue', () => { + it('invokes renameTagTemplateFieldEnumValue 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.RenameTagTemplateFieldEnumValueRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.datacatalog.v1beta1.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.v1beta1.DataCatalogClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.datacatalog.v1beta1.TagTemplateField() + ); + client.innerApiCalls.renameTagTemplateFieldEnumValue = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.renameTagTemplateFieldEnumValue( + 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.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.v1beta1.DataCatalogClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.v1beta1.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.v1beta1.DataCatalogClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.v1beta1.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.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('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.v1beta1.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.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/owl-bot-staging/google-cloud-datacatalog/v1beta1/test/gapic_policy_tag_manager_serialization_v1beta1.ts b/owl-bot-staging/google-cloud-datacatalog/v1beta1/test/gapic_policy_tag_manager_serialization_v1beta1.ts new file mode 100644 index 00000000000..d4e1d753289 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/test/gapic_policy_tag_manager_serialization_v1beta1.ts @@ -0,0 +1,863 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 apiEndpoint', () => { + const client = new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient.servicePath; + assert.strictEqual(servicePath, 'datacatalog.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datacatalog.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datacatalog.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datacatalog.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datacatalog.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/test/gapic_policy_tag_manager_v1beta1.ts b/owl-bot-staging/google-cloud-datacatalog/v1beta1/test/gapic_policy_tag_manager_v1beta1.ts new file mode 100644 index 00000000000..5d83086b651 --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/test/gapic_policy_tag_manager_v1beta1.ts @@ -0,0 +1,2380 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 apiEndpoint', () => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = policytagmanagerModule.v1beta1.PolicyTagManagerClient.servicePath; + assert.strictEqual(servicePath, 'datacatalog.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = policytagmanagerModule.v1beta1.PolicyTagManagerClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datacatalog.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datacatalog.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datacatalog.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datacatalog.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new policytagmanagerModule.v1beta1.PolicyTagManagerClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/tsconfig.json b/owl-bot-staging/google-cloud-datacatalog/v1beta1/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/webpack.config.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/webpack.config.js new file mode 100644 index 00000000000..95cf943fced --- /dev/null +++ b/owl-bot-staging/google-cloud-datacatalog/v1beta1/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: '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', +}; From e40beb339cdae2c44379e6b8a24260c39769bf5a Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 14 Jan 2025 20:07:54 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../google-cloud-datacatalog/v1/.eslintignore | 7 - .../v1/.eslintrc.json | 3 - .../google-cloud-datacatalog/v1/.gitignore | 14 - .../google-cloud-datacatalog/v1/.jsdoc.js | 55 - .../google-cloud-datacatalog/v1/.mocharc.js | 33 - .../v1/.prettierrc.js | 22 - .../google-cloud-datacatalog/v1/README.md | 1 - .../google-cloud-datacatalog/v1/package.json | 60 - .../cloud/datacatalog/v1/bigquery.proto | 81 - .../google/cloud/datacatalog/v1/common.proto | 81 - .../cloud/datacatalog/v1/data_source.proto | 86 - .../cloud/datacatalog/v1/datacatalog.proto | 2412 - .../cloud/datacatalog/v1/dataplex_spec.proto | 89 - .../cloud/datacatalog/v1/dump_content.proto | 55 - .../datacatalog/v1/gcs_fileset_spec.proto | 80 - .../datacatalog/v1/physical_schema.proto | 76 - .../datacatalog/v1/policytagmanager.proto | 506 - .../v1/policytagmanagerserialization.proto | 229 - .../google/cloud/datacatalog/v1/schema.proto | 148 - .../google/cloud/datacatalog/v1/search.proto | 119 - .../cloud/datacatalog/v1/table_spec.proto | 114 - .../google/cloud/datacatalog/v1/tags.proto | 307 - .../cloud/datacatalog/v1/timestamps.proto | 48 - .../google/cloud/datacatalog/v1/usage.proto | 83 - .../v1/protos/protos.d.ts | 25619 ------- .../v1/protos/protos.js | 63902 ---------------- .../v1/protos/protos.json | 6607 -- .../generated/v1/data_catalog.create_entry.js | 76 - .../v1/data_catalog.create_entry_group.js | 76 - .../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 - .../v1/data_catalog.import_entries.js | 71 - .../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 | 103 - .../v1/data_catalog.modify_entry_contacts.js | 66 - .../v1/data_catalog.modify_entry_overview.js | 66 - .../v1/data_catalog.reconcile_tags.js | 80 - .../data_catalog.rename_tag_template_field.js | 67 - ...og.rename_tag_template_field_enum_value.js | 67 - .../v1/data_catalog.retrieve_config.js | 61 - .../data_catalog.retrieve_effective_config.js | 61 - .../v1/data_catalog.search_catalog.js | 118 - .../generated/v1/data_catalog.set_config.js | 69 - .../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 | 79 - .../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 | 72 - ...manager_serialization.import_taxonomies.js | 70 - ..._manager_serialization.replace_taxonomy.js | 66 - ..._metadata_google.cloud.datacatalog.v1.json | 2407 - .../google-cloud-datacatalog/v1/src/index.ts | 29 - .../v1/src/v1/data_catalog_client.ts | 4651 -- .../v1/src/v1/data_catalog_client_config.json | 216 - .../v1/src/v1/data_catalog_proto_list.json | 18 - .../v1/src/v1/gapic_metadata.json | 605 - .../v1/src/v1/index.ts | 21 - .../v1/src/v1/policy_tag_manager_client.ts | 2055 - .../v1/policy_tag_manager_client_config.json | 91 - .../src/v1/policy_tag_manager_proto_list.json | 18 - ...policy_tag_manager_serialization_client.ts | 1085 - ...g_manager_serialization_client_config.json | 41 - ..._tag_manager_serialization_proto_list.json | 18 - .../system-test/fixtures/sample/src/index.js | 29 - .../system-test/fixtures/sample/src/index.ts | 44 - .../v1/system-test/install.ts | 49 - .../v1/test/gapic_data_catalog_v1.ts | 5321 -- ...pic_policy_tag_manager_serialization_v1.ts | 971 - .../v1/test/gapic_policy_tag_manager_v1.ts | 2380 - .../google-cloud-datacatalog/v1/tsconfig.json | 19 - .../v1/webpack.config.js | 64 - .../v1beta1/.eslintignore | 7 - .../v1beta1/.eslintrc.json | 3 - .../v1beta1/.gitignore | 14 - .../v1beta1/.jsdoc.js | 55 - .../v1beta1/.mocharc.js | 33 - .../v1beta1/.prettierrc.js | 22 - .../v1beta1/README.md | 1 - .../v1beta1/package.json | 60 - .../cloud/datacatalog/v1beta1/common.proto | 50 - .../datacatalog/v1beta1/datacatalog.proto | 1315 - .../v1beta1/gcs_fileset_spec.proto | 78 - .../v1beta1/policytagmanager.proto | 452 - .../policytagmanagerserialization.proto | 169 - .../cloud/datacatalog/v1beta1/schema.proto | 55 - .../cloud/datacatalog/v1beta1/search.proto | 73 - .../datacatalog/v1beta1/table_spec.proto | 105 - .../cloud/datacatalog/v1beta1/tags.proto | 250 - .../datacatalog/v1beta1/timestamps.proto | 41 - .../cloud/datacatalog/v1beta1/usage.proto | 59 - .../v1beta1/protos/protos.d.ts | 17208 ----- .../v1beta1/protos/protos.js | 43311 ----------- .../v1beta1/protos/protos.json | 4750 -- .../v1beta1/data_catalog.create_entry.js | 74 - .../data_catalog.create_entry_group.js | 75 - .../v1beta1/data_catalog.create_tag.js | 71 - .../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 | 68 - ...og.rename_tag_template_field_enum_value.js | 68 - .../v1beta1/data_catalog.search_catalog.js | 103 - .../v1beta1/data_catalog.set_iam_policy.js | 77 - .../data_catalog.test_iam_permissions.js | 70 - .../v1beta1/data_catalog.update_entry.js | 85 - .../data_catalog.update_entry_group.js | 68 - .../v1beta1/data_catalog.update_tag.js | 70 - .../data_catalog.update_tag_template.js | 69 - .../data_catalog.update_tag_template_field.js | 83 - .../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 | 78 - .../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 | 1947 - .../v1beta1/src/index.ts | 29 - .../src/v1beta1/data_catalog_client.ts | 3761 - .../v1beta1/data_catalog_client_config.json | 171 - .../src/v1beta1/data_catalog_proto_list.json | 13 - .../v1beta1/src/v1beta1/gapic_metadata.json | 505 - .../v1beta1/src/v1beta1/index.ts | 21 - .../src/v1beta1/policy_tag_manager_client.ts | 2024 - .../policy_tag_manager_client_config.json | 91 - .../policy_tag_manager_proto_list.json | 13 - ...policy_tag_manager_serialization_client.ts | 991 - ...g_manager_serialization_client_config.json | 36 - ..._tag_manager_serialization_proto_list.json | 13 - .../system-test/fixtures/sample/src/index.js | 29 - .../system-test/fixtures/sample/src/index.ts | 44 - .../v1beta1/system-test/install.ts | 49 - .../test/gapic_data_catalog_v1beta1.ts | 4241 - ...olicy_tag_manager_serialization_v1beta1.ts | 863 - .../test/gapic_policy_tag_manager_v1beta1.ts | 2380 - .../v1beta1/tsconfig.json | 19 - .../v1beta1/webpack.config.js | 64 - packages/google-cloud-datacatalog/.jsdoc.js | 4 +- .../generated/v1/data_catalog.create_entry.js | 2 +- .../v1/data_catalog.create_entry_group.js | 2 +- .../generated/v1/data_catalog.create_tag.js | 2 +- .../v1/data_catalog.create_tag_template.js | 2 +- .../data_catalog.create_tag_template_field.js | 2 +- .../generated/v1/data_catalog.delete_entry.js | 2 +- .../v1/data_catalog.delete_entry_group.js | 2 +- .../generated/v1/data_catalog.delete_tag.js | 2 +- .../v1/data_catalog.delete_tag_template.js | 2 +- .../data_catalog.delete_tag_template_field.js | 2 +- .../generated/v1/data_catalog.get_entry.js | 2 +- .../v1/data_catalog.get_entry_group.js | 2 +- .../v1/data_catalog.get_iam_policy.js | 2 +- .../v1/data_catalog.get_tag_template.js | 2 +- .../v1/data_catalog.import_entries.js | 2 +- .../generated/v1/data_catalog.list_entries.js | 2 +- .../v1/data_catalog.list_entry_groups.js | 2 +- .../generated/v1/data_catalog.list_tags.js | 2 +- .../generated/v1/data_catalog.lookup_entry.js | 2 +- .../v1/data_catalog.modify_entry_contacts.js | 2 +- .../v1/data_catalog.modify_entry_overview.js | 2 +- .../v1/data_catalog.reconcile_tags.js | 2 +- .../data_catalog.rename_tag_template_field.js | 2 +- ...og.rename_tag_template_field_enum_value.js | 2 +- .../v1/data_catalog.retrieve_config.js | 2 +- .../data_catalog.retrieve_effective_config.js | 2 +- .../v1/data_catalog.search_catalog.js | 2 +- .../generated/v1/data_catalog.set_config.js | 2 +- .../v1/data_catalog.set_iam_policy.js | 2 +- .../generated/v1/data_catalog.star_entry.js | 2 +- .../v1/data_catalog.test_iam_permissions.js | 2 +- .../generated/v1/data_catalog.unstar_entry.js | 2 +- .../generated/v1/data_catalog.update_entry.js | 2 +- .../v1/data_catalog.update_entry_group.js | 2 +- .../generated/v1/data_catalog.update_tag.js | 2 +- .../v1/data_catalog.update_tag_template.js | 2 +- .../data_catalog.update_tag_template_field.js | 2 +- .../policy_tag_manager.create_policy_tag.js | 2 +- .../v1/policy_tag_manager.create_taxonomy.js | 2 +- .../policy_tag_manager.delete_policy_tag.js | 2 +- .../v1/policy_tag_manager.delete_taxonomy.js | 2 +- .../v1/policy_tag_manager.get_iam_policy.js | 2 +- .../v1/policy_tag_manager.get_policy_tag.js | 2 +- .../v1/policy_tag_manager.get_taxonomy.js | 2 +- .../v1/policy_tag_manager.list_policy_tags.js | 2 +- .../v1/policy_tag_manager.list_taxonomies.js | 2 +- .../v1/policy_tag_manager.set_iam_policy.js | 2 +- ...policy_tag_manager.test_iam_permissions.js | 2 +- .../policy_tag_manager.update_policy_tag.js | 2 +- .../v1/policy_tag_manager.update_taxonomy.js | 2 +- ...manager_serialization.export_taxonomies.js | 2 +- ...manager_serialization.import_taxonomies.js | 2 +- ..._manager_serialization.replace_taxonomy.js | 2 +- .../src/v1/data_catalog_client.ts | 2 +- .../google-cloud-datacatalog/src/v1/index.ts | 2 +- .../src/v1/policy_tag_manager_client.ts | 2 +- ...policy_tag_manager_serialization_client.ts | 2 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- .../system-test/install.ts | 2 +- .../test/gapic_data_catalog_v1.ts | 2 +- ...pic_policy_tag_manager_serialization_v1.ts | 2 +- .../test/gapic_policy_tag_manager_v1.ts | 2 +- 251 files changed, 65 insertions(+), 213238 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/.eslintignore delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/.eslintrc.json delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/.jsdoc.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/.mocharc.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/.prettierrc.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/README.md delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/package.json delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/bigquery.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/common.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/data_source.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/datacatalog.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/dataplex_spec.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/dump_content.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/gcs_fileset_spec.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/physical_schema.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/policytagmanager.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/policytagmanagerserialization.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/schema.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/search.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/table_spec.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/tags.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/timestamps.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/usage.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/protos.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/protos/protos.json delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_entry.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_entry_group.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_tag.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_tag_template.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_tag_template_field.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_entry.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_entry_group.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_tag.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_tag_template.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_tag_template_field.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_entry.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_entry_group.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_iam_policy.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_tag_template.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.import_entries.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.list_entries.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.list_entry_groups.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.list_tags.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.lookup_entry.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.modify_entry_contacts.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.modify_entry_overview.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.reconcile_tags.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.rename_tag_template_field.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.rename_tag_template_field_enum_value.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.retrieve_config.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.retrieve_effective_config.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.search_catalog.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.set_config.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.set_iam_policy.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.star_entry.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.test_iam_permissions.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.unstar_entry.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_entry.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_entry_group.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_tag.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_tag_template.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_tag_template_field.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.create_policy_tag.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.create_taxonomy.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.delete_policy_tag.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.delete_taxonomy.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.get_iam_policy.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.get_policy_tag.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.get_taxonomy.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.list_policy_tags.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.list_taxonomies.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.set_iam_policy.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.test_iam_permissions.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.update_policy_tag.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.update_taxonomy.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager_serialization.export_taxonomies.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager_serialization.import_taxonomies.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager_serialization.replace_taxonomy.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.v1.json delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/src/v1/data_catalog_client.ts delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/src/v1/data_catalog_client_config.json delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/src/v1/data_catalog_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/src/v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/src/v1/index.ts delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_client.ts delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_client_config.json delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_serialization_client.ts delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_serialization_client_config.json delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_serialization_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/system-test/install.ts delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/test/gapic_data_catalog_v1.ts delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/test/gapic_policy_tag_manager_serialization_v1.ts delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/test/gapic_policy_tag_manager_v1.ts delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/tsconfig.json delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1/webpack.config.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/.eslintignore delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/.eslintrc.json delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/.jsdoc.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/.mocharc.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/.prettierrc.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/README.md delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/package.json delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/common.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/datacatalog.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/policytagmanager.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/schema.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/search.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/table_spec.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/tags.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/timestamps.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/usage.proto delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/protos.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/protos.json delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_entry.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_entry_group.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_tag.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_tag_template.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_tag_template_field.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_entry.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_entry_group.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_tag.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_tag_template.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_tag_template_field.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_entry.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_entry_group.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_iam_policy.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_tag_template.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.list_entries.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.list_entry_groups.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.list_tags.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.lookup_entry.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.rename_tag_template_field.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.rename_tag_template_field_enum_value.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.search_catalog.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.set_iam_policy.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.test_iam_permissions.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_entry.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_entry_group.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_tag.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_tag_template.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_tag_template_field.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.create_policy_tag.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.create_taxonomy.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.delete_policy_tag.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.delete_taxonomy.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.get_iam_policy.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.get_policy_tag.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.get_taxonomy.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.list_policy_tags.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.list_taxonomies.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.set_iam_policy.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.test_iam_permissions.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.update_policy_tag.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.update_taxonomy.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager_serialization.export_taxonomies.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager_serialization.import_taxonomies.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.datacatalog.v1beta1.json delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/data_catalog_client.ts delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/data_catalog_client_config.json delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/data_catalog_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/index.ts delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_client.ts delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_client_config.json delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_serialization_client.ts delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_serialization_client_config.json delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_serialization_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/system-test/install.ts delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/test/gapic_data_catalog_v1beta1.ts delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/test/gapic_policy_tag_manager_serialization_v1beta1.ts delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/test/gapic_policy_tag_manager_v1beta1.ts delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/tsconfig.json delete mode 100644 owl-bot-staging/google-cloud-datacatalog/v1beta1/webpack.config.js diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/.eslintignore b/owl-bot-staging/google-cloud-datacatalog/v1/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/.eslintignore +++ /dev/null @@ -1,7 +0,0 @@ -**/node_modules -**/.coverage -build/ -docs/ -protos/ -system-test/ -samples/generated/ diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/.eslintrc.json b/owl-bot-staging/google-cloud-datacatalog/v1/.eslintrc.json deleted file mode 100644 index 78215349546..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/.gitignore b/owl-bot-staging/google-cloud-datacatalog/v1/.gitignore deleted file mode 100644 index d4f03a0df2e..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -**/*.log -**/node_modules -/.coverage -/coverage -/.nyc_output -/docs/ -/out/ -/build/ -system-test/secrets.js -system-test/*key.json -*.lock -.DS_Store -package-lock.json -__pycache__ diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/.jsdoc.js b/owl-bot-staging/google-cloud-datacatalog/v1/.jsdoc.js deleted file mode 100644 index ac28df7d11a..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/.jsdoc.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 2025 Google LLC', - includeDate: false, - sourceFiles: false, - systemName: '@google-cloud/datacatalog', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/.mocharc.js b/owl-bot-staging/google-cloud-datacatalog/v1/.mocharc.js deleted file mode 100644 index 24e9d15257f..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/.mocharc.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -const config = { - "enable-source-maps": true, - "throw-deprecation": true, - "timeout": 10000 -} -if (process.env.MOCHA_THROW_DEPRECATION === 'false') { - delete config['throw-deprecation']; -} -if (process.env.MOCHA_REPORTER) { - config.reporter = process.env.MOCHA_REPORTER; -} -if (process.env.MOCHA_REPORTER_OUTPUT) { - config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; -} -module.exports = config diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/.prettierrc.js b/owl-bot-staging/google-cloud-datacatalog/v1/.prettierrc.js deleted file mode 100644 index d89a632f90b..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/.prettierrc.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - -module.exports = { - ...require('gts/.prettierrc.json') -} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/README.md b/owl-bot-staging/google-cloud-datacatalog/v1/README.md deleted file mode 100644 index 32cb6c97c40..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/README.md +++ /dev/null @@ -1 +0,0 @@ -Datacatalog: Nodejs Client diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/package.json b/owl-bot-staging/google-cloud-datacatalog/v1/package.json deleted file mode 100644 index 422f93bf7e4..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "@google-cloud/datacatalog", - "version": "0.1.0", - "description": "Datacatalog client for Node.js", - "repository": "googleapis/nodejs-datacatalog", - "license": "Apache-2.0", - "author": "Google LLC", - "main": "build/src/index.js", - "files": [ - "build/src", - "build/protos" - ], - "keywords": [ - "google apis client", - "google api client", - "google apis", - "google api", - "google", - "google cloud platform", - "google cloud", - "cloud", - "google datacatalog", - "datacatalog", - "data catalog", - "policy tag manager", - "policy tag manager serialization" - ], - "scripts": { - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", - "compile-protos": "compileProtos src", - "docs": "jsdoc -c .jsdoc.js", - "fix": "gts fix", - "lint": "gts check", - "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test" - }, - "dependencies": { - "google-gax": "^4.3.4" - }, - "devDependencies": { - "@types/mocha": "^10.0.6", - "@types/node": "^20.12.12", - "@types/sinon": "^10.0.20", - "c8": "^9.1.0", - "gapic-tools": "^0.4.2", - "gts": "5.3.0", - "jsdoc": "^4.0.3", - "jsdoc-fresh": "^3.0.0", - "jsdoc-region-tag": "^3.0.0", - "mocha": "^10.4.0", - "pack-n-play": "^2.0.3", - "sinon": "^15.2.0", - "typescript": "5.1.6" - }, - "engines": { - "node": ">=v14" - } -} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/bigquery.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/bigquery.proto deleted file mode 100644 index 3ca0caf073d..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/bigquery.proto +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1; - -import "google/api/field_behavior.proto"; - -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; -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/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/common.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/common.proto deleted file mode 100644 index c43b226f001..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/common.proto +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1; - -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; -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; - - // Cloud Spanner - CLOUD_SPANNER = 6; - - // Cloud Bigtable - CLOUD_BIGTABLE = 7; - - // Cloud Sql - CLOUD_SQL = 8; - - // Looker - LOOKER = 9; - - // Vertex AI - VERTEX_AI = 10; -} - -// This enum describes all the systems that manage -// Taxonomy and PolicyTag resources in DataCatalog. -enum ManagingSystem { - // Default value - MANAGING_SYSTEM_UNSPECIFIED = 0; - - // Dataplex. - MANAGING_SYSTEM_DATAPLEX = 1; - - // Other - MANAGING_SYSTEM_OTHER = 2; -} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/data_source.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/data_source.proto deleted file mode 100644 index 7e9f43116b8..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/data_source.proto +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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 csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; -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/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/datacatalog.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/datacatalog.proto deleted file mode 100644 index e9581cb2809..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/datacatalog.proto +++ /dev/null @@ -1,2412 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.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/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/rpc/status.proto"; - -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; -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"; - } - - // `ReconcileTags` creates or updates a list of tags on the entry. - // If the - // [ReconcileTagsRequest.force_delete_missing][google.cloud.datacatalog.v1.ReconcileTagsRequest.force_delete_missing] - // parameter is set, the operation deletes tags not included in the input tag - // list. - // - // `ReconcileTags` returns a [long-running operation] - // [google.longrunning.Operation] resource that can be queried with - // [Operations.GetOperation][google.longrunning.Operations.GetOperation] - // to return [ReconcileTagsMetadata] - // [google.cloud.datacatalog.v1.ReconcileTagsMetadata] and - // a [ReconcileTagsResponse] - // [google.cloud.datacatalog.v1.ReconcileTagsResponse] message. - rpc ReconcileTags(ReconcileTagsRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags:reconcile" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "ReconcileTagsResponse" - metadata_type: "ReconcileTagsMetadata" - }; - } - - // 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: "*" - } - }; - } - - // Imports entries from a source, such as data previously dumped into a - // Cloud Storage bucket, into Data Catalog. Import of entries - // is a sync operation that reconciles the state of the third-party system - // with the Data Catalog. - // - // `ImportEntries` accepts source data snapshots of a third-party system. - // Snapshot should be delivered as a .wire or base65-encoded .txt file - // containing a sequence of Protocol Buffer messages of - // [DumpItem][google.cloud.datacatalog.v1.DumpItem] type. - // - // `ImportEntries` returns a [long-running operation] - // [google.longrunning.Operation] resource that can be queried with - // [Operations.GetOperation][google.longrunning.Operations.GetOperation] - // to return - // [ImportEntriesMetadata][google.cloud.datacatalog.v1.ImportEntriesMetadata] - // and an - // [ImportEntriesResponse][google.cloud.datacatalog.v1.ImportEntriesResponse] - // message. - rpc ImportEntries(ImportEntriesRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries:import" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "ImportEntriesResponse" - metadata_type: "ImportEntriesMetadata" - }; - } - - // Sets the configuration related to the migration to Dataplex for an - // organization or project. - rpc SetConfig(SetConfigRequest) returns (MigrationConfig) { - option (google.api.http) = { - post: "/v1/{name=organizations/*/locations/*}:setConfig" - body: "*" - additional_bindings { - post: "/v1/{name=projects/*/locations/*}:setConfig" - body: "*" - } - }; - } - - // Retrieves the configuration related to the migration from Data Catalog to - // Dataplex for a specific organization, including all the projects under it - // which have a separate configuration set. - rpc RetrieveConfig(RetrieveConfigRequest) returns (OrganizationConfig) { - option (google.api.http) = { - get: "/v1/{name=organizations/*/locations/*}:retrieveConfig" - }; - } - - // Retrieves the effective configuration related to the migration from Data - // Catalog to Dataplex for a specific organization or project. If there is no - // specific configuration set for the resource, the setting is checked - // hierarchicahlly through the ancestors of the resource, starting from the - // resource itself. - rpc RetrieveEffectiveConfig(RetrieveEffectiveConfigRequest) - returns (MigrationConfig) { - option (google.api.http) = { - get: "/v1/{name=organizations/*/locations/*}:retrieveEffectiveConfig" - additional_bindings { - get: "/v1/{name=projects/*/locations/*}:retrieveEffectiveConfig" - } - }; - } -} - -// 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 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]; - - // Upper bound on the number of results you can get in a single response. - // - // 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 - // - // 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. - // If you are experiencing recall issues and you don't have to fetch the - // results in any specific order, consider setting this parameter to - // `default`. - // - // If this parameter is omitted, it defaults to the descending `relevance`. - string order_by = 5; - - // Optional. If set, use searchAll permission granted on organizations from - // `include_org_ids` and projects from `include_project_ids` instead of the - // fine grained per resource permissions when filtering the search results. - // The only allowed `order_by` criteria for admin_search mode is `default`. - // Using this flags guarantees a full recall of the search results. - bool admin_search = 17 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for -// [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. -message SearchCatalogResponse { - // Search results. - repeated SearchCatalogResult results = 1; - - // The approximate total number of entries matched by the query. - int32 total_size = 2; - - // 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)](https://cloud.google.com//data-catalog/docs/fully-qualified-names) - // 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; - } - - // Project where the lookup should be performed. Required to lookup - // entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` - // using its `fully_qualified_name`. Ignored in other cases. - string project = 6; - - // Location where the lookup should be performed. Required to lookup - // entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` - // using its `fully_qualified_name`. Ignored in other cases. - string location = 7; -} - -// 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. Identifier. 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.field_behavior) = IDENTIFIER, - (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)](https://cloud.google.com//data-catalog/docs/fully-qualified-names) - // of the resource. Set automatically for entries representing resources from - // synced systems. Settable only during creation, and read-only later. Can - // be used for search and lookup of the entries. - // - string fully_qualified_name = 29; - - // Required. Entry type. - oneof entry_type { - // The type of the entry. - // - // For details, see [`EntryType`](#entrytype). - 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; - } - - // System specification. - // Can be used as a complement for `spec`, when some metadata is relevant for - // all entries existing within given system - oneof system_spec { - // Specification that applies to a relational database system. Only settable - // when `user_specified_system` is equal to `SQL_DATABASE` - SqlDatabaseSystemSpec sql_database_system_spec = 39; - - // Specification that applies to Looker sysstem. Only settable when - // `user_specified_system` is equal to `LOOKER` - LookerSystemSpec looker_system_spec = 40; - - // Specification that applies to Cloud Bigtable system. Only settable when - // `integrated_system` is equal to `CLOUD_BIGTABLE` - CloudBigtableSystemSpec cloud_bigtable_system_spec = 41; - } - - // 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` or `EXPLORE` 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 dataset. - DatasetSpec dataset_spec = 32; - - // Specification that applies to a fileset resource. Valid only - // for entries with the `FILESET` type. - FilesetSpec fileset_spec = 33; - - // Specification that applies to a Service resource. - ServiceSpec service_spec = 42; - - // Model specification. - ModelSpec model_spec = 43; - - // FeatureonlineStore spec for Vertex AI Feature Store. - FeatureOnlineStoreSpec feature_online_store_spec = 45; - } - - // Display name of an entry. - // - // The maximum size is 500 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; - } - - // Specification that applies to database view. - message DatabaseViewSpec { - // Concrete type of the view. - enum ViewType { - // Default unknown view type. - VIEW_TYPE_UNSPECIFIED = 0; - - // Standard view. - STANDARD_VIEW = 1; - - // Materialized view. - MATERIALIZED_VIEW = 2; - } - - // Type of this view. - ViewType view_type = 1; - - // Definition of the view. - oneof source_definition { - // Name of a singular table this view reflects one to one. - string base_table = 2; - - // SQL query used to generate this view. - string sql_query = 3; - } - } - - // 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]; - - // Spec what aplies to tables that are actually views. - // Not set for "real" tables. - DatabaseViewSpec database_view_spec = 3; -} - -// 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; - } -} - -// Specification that applies to a dataset. Valid only for -// entries with the `DATASET` type. -message DatasetSpec { - // Fields specific to the source system. - oneof system_spec { - // Vertex AI Dataset specific fields - VertexDatasetSpec vertex_dataset_spec = 2; - } -} - -// Specification that applies to -// entries that are part `SQL_DATABASE` system -// (user_specified_type) -message SqlDatabaseSystemSpec { - // SQL Database Engine. - // enum SqlEngine { - // UNDEFINED = 0; - // MY_SQL = 1; - // POSTGRE_SQL = 2; - // SQL_SERVER = 3; - // } - // Engine of the enclosing database instance. - string sql_engine = 1; - - // Version of the database engine. - string database_version = 2; - - // Host of the SQL database - // enum InstanceHost { - // UNDEFINED = 0; - // SELF_HOSTED = 1; - // CLOUD_SQL = 2; - // AMAZON_RDS = 3; - // AZURE_SQL = 4; - // } - // Host of the enclousing database instance. - string instance_host = 3; -} - -// Specification that applies to -// entries that are part `LOOKER` system -// (user_specified_type) -message LookerSystemSpec { - // ID of the parent Looker Instance. Empty if it does not exist. - // Example value: `someinstance.looker.com` - string parent_instance_id = 1; - - // Name of the parent Looker Instance. Empty if it does not exist. - string parent_instance_display_name = 2; - - // ID of the parent Model. Empty if it does not exist. - string parent_model_id = 3; - - // Name of the parent Model. Empty if it does not exist. - string parent_model_display_name = 4; - - // ID of the parent View. Empty if it does not exist. - string parent_view_id = 5; - - // Name of the parent View. Empty if it does not exist. - string parent_view_display_name = 6; -} - -// Specification that applies to -// all entries that are part of `CLOUD_BIGTABLE` system -// (user_specified_type) -message CloudBigtableSystemSpec { - // Display name of the Instance. This is user specified and different from - // the resource name. - string instance_display_name = 1; -} - -// Specification that applies to Instance -// entries that are part of `CLOUD_BIGTABLE` system. -// (user_specified_type) -message CloudBigtableInstanceSpec { - // Spec that applies to clusters of an Instance of Cloud Bigtable. - message CloudBigtableClusterSpec { - // Name of the cluster. - string display_name = 1; - - // Location of the cluster, typically a Cloud zone. - string location = 2; - - // Type of the resource. For a cluster this would be "CLUSTER". - string type = 3; - - // A link back to the parent resource, in this case Instance. - string linked_resource = 4; - } - - // The list of clusters for the Instance. - repeated CloudBigtableClusterSpec cloud_bigtable_cluster_specs = 1; -} - -// Specification that applies to a Service resource. Valid only -// for entries with the `SERVICE` type. -message ServiceSpec { - // System spec - oneof system_spec { - // Specification that applies to Instance entries of `CLOUD_BIGTABLE` - // system. - CloudBigtableInstanceSpec cloud_bigtable_instance_spec = 1; - } -} - -// Detail description of the source information of a Vertex model. -message VertexModelSourceInfo { - // Source of the model. - enum ModelSourceType { - // Should not be used. - MODEL_SOURCE_TYPE_UNSPECIFIED = 0; - - // The Model is uploaded by automl training pipeline. - AUTOML = 1; - - // The Model is uploaded by user or custom training pipeline. - CUSTOM = 2; - - // The Model is registered and sync'ed from BigQuery ML. - BQML = 3; - - // The Model is saved or tuned from Model Garden. - MODEL_GARDEN = 4; - - // The Model is saved or tuned from Genie. - GENIE = 5; - - // The Model is uploaded by text embedding finetuning pipeline. - CUSTOM_TEXT_EMBEDDING = 6; - - // The Model is saved or tuned from Marketplace. - MARKETPLACE = 7; - } - - // Type of the model source. - ModelSourceType source_type = 1; - - // If this Model is copy of another Model. If true then - // [source_type][google.cloud.datacatalog.v1.VertexModelSourceInfo.source_type] - // pertains to the original. - bool copy = 2; -} - -// Specification for vertex model resources. -message VertexModelSpec { - // The version ID of the model. - string version_id = 1; - - // User provided version aliases so that a model version can be referenced via - // alias - repeated string version_aliases = 2; - - // The description of this version. - string version_description = 3; - - // Source of a Vertex model. - VertexModelSourceInfo vertex_model_source_info = 4; - - // URI of the Docker image to be used as the custom container for serving - // predictions. - string container_image_uri = 5; -} - -// Specification for vertex dataset resources. -message VertexDatasetSpec { - // Type of data stored in the dataset. - enum DataType { - // Should not be used. - DATA_TYPE_UNSPECIFIED = 0; - - // Structured data dataset. - TABLE = 1; - - // Image dataset which supports ImageClassification, ImageObjectDetection - // and ImageSegmentation problems. - IMAGE = 2; - - // Document dataset which supports TextClassification, TextExtraction and - // TextSentiment problems. - TEXT = 3; - - // Video dataset which supports VideoClassification, VideoObjectTracking and - // VideoActionRecognition problems. - VIDEO = 4; - - // Conversation dataset which supports conversation problems. - CONVERSATION = 5; - - // TimeSeries dataset. - TIME_SERIES = 6; - - // Document dataset which supports DocumentAnnotation problems. - DOCUMENT = 7; - - // TextToSpeech dataset which supports TextToSpeech problems. - TEXT_TO_SPEECH = 8; - - // Translation dataset which supports Translation problems. - TRANSLATION = 9; - - // Store Vision dataset which is used for HITL integration. - STORE_VISION = 10; - - // Enterprise Knowledge Graph dataset which is used for HITL labeling - // integration. - ENTERPRISE_KNOWLEDGE_GRAPH = 11; - - // Text prompt dataset which supports Large Language Models. - TEXT_PROMPT = 12; - } - - // The number of DataItems in this Dataset. Only apply for non-structured - // Dataset. - int64 data_item_count = 1; - - // Type of the dataset. - DataType data_type = 2; -} - -// Specification that applies to a model. Valid only for -// entries with the `MODEL` type. -message ModelSpec { - // System spec - oneof system_spec { - // Specification for vertex model resources. - VertexModelSpec vertex_model_spec = 1; - } -} - -// Detail description of the source information of a Vertex Feature Online -// Store. -message FeatureOnlineStoreSpec { - // Type of underlaying storage type. - enum StorageType { - // Should not be used. - STORAGE_TYPE_UNSPECIFIED = 0; - - // Underlsying storgae is Bigtable. - BIGTABLE = 1; - - // Underlaying is optimized online server (Lightning). - OPTIMIZED = 2; - } - - // Output only. Type of underelaying storage for the FeatureOnlineStore. - StorageType storage_type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// 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}" - }; - - // Identifier. 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 [(google.api.field_behavior) = IDENTIFIER]; - - // 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]; - - // Optional. When set to [true], it means DataCatalog EntryGroup was - // transferred to Dataplex Catalog Service. It makes EntryGroup and its - // Entries to be read-only in DataCatalog. However, new Tags on EntryGroup and - // its Entries can be created. After setting the flag to [true] it cannot be - // unset. - bool transferred_to_dataplex = 9 [(google.api.field_behavior) = OPTIONAL]; -} - -// 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 -// [ReconcileTags][google.cloud.datacatalog.v1.DataCatalog.ReconcileTags]. -message ReconcileTagsRequest { - // Required. Name of [Entry][google.cloud.datacatalog.v1.Entry] to be tagged. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Entry" - } - ]; - - // Required. The name of the tag template, which is used for reconciliation. - string tag_template = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplate" - } - ]; - - // If set to `true`, deletes entry tags related to a tag template - // not listed in the tags source from an entry. If set to `false`, - // unlisted tags are retained. - bool force_delete_missing = 3; - - // A list of tags to apply to an entry. A tag can specify a - // tag template, which must be the template specified in the - // `ReconcileTagsRequest`. - // The sole entry and each of its columns must be mentioned at most once. - repeated Tag tags = 4; -} - -// [Long-running operation][google.longrunning.Operation] -// response message returned by -// [ReconcileTags][google.cloud.datacatalog.v1.DataCatalog.ReconcileTags]. -message ReconcileTagsResponse { - // Number of tags created in the request. - int64 created_tags_count = 1; - - // Number of tags updated in the request. - int64 updated_tags_count = 2; - - // Number of tags deleted in the request. - int64 deleted_tags_count = 3; -} - -// [Long-running operation][google.longrunning.Operation] -// metadata message returned by the -// [ReconcileTags][google.cloud.datacatalog.v1.DataCatalog.ReconcileTags]. -message ReconcileTagsMetadata { - // Enum holding possible states of the reconciliation operation. - enum ReconciliationState { - // Default value. This value is unused. - RECONCILIATION_STATE_UNSPECIFIED = 0; - - // The reconciliation has been queued and awaits for execution. - RECONCILIATION_QUEUED = 1; - - // The reconciliation is in progress. - RECONCILIATION_IN_PROGRESS = 2; - - // The reconciliation has been finished. - RECONCILIATION_DONE = 3; - } - - // State of the reconciliation operation. - ReconciliationState state = 1; - - // Maps the name of each tagged column (or empty string for a - // sole entry) to tagging operation [status][google.rpc.Status]. - map errors = 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 -// [ImportEntries][google.cloud.datacatalog.v1.DataCatalog.ImportEntries] -// method. -message ImportEntriesRequest { - // Required. Target entry group for ingested entries. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/Entry" - } - ]; - - // Source of imported entries, e.g. dump stored in a Cloud Storage - oneof source { - // Path to a Cloud Storage bucket that contains a dump ready for ingestion. - string gcs_bucket_path = 2; - } - - // Optional. (Optional) Dataplex task job id, if specified will be used as - // part of ImportEntries LRO ID - string job_id = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for [long-running operation][google.longrunning.Operation] -// returned by the -// [ImportEntries][google.cloud.datacatalog.v1.DataCatalog.ImportEntries]. -message ImportEntriesResponse { - // Cumulative number of entries created and entries updated as a result of - // import operation. - optional int64 upserted_entries_count = 5; - - // Number of entries deleted as a result of import operation. - optional int64 deleted_entries_count = 6; -} - -// Metadata message for [long-running operation][google.longrunning.Operation] -// returned by the -// [ImportEntries][google.cloud.datacatalog.v1.DataCatalog.ImportEntries]. -message ImportEntriesMetadata { - // Enum holding possible states of the import operation. - enum ImportState { - // Default value. This value is unused. - IMPORT_STATE_UNSPECIFIED = 0; - - // The dump with entries has been queued for import. - IMPORT_QUEUED = 1; - - // The import of entries is in progress. - IMPORT_IN_PROGRESS = 2; - - // The import of entries has been finished. - IMPORT_DONE = 3; - - // The import of entries has been abandoned in favor of a newer request. - IMPORT_OBSOLETE = 4; - } - - // State of the import operation. - ImportState state = 1; - - // Partial errors that are encountered during the ImportEntries operation. - // There is no guarantee that all the encountered errors are reported. - // However, if no errors are reported, it means that no errors were - // encountered. - repeated google.rpc.Status errors = 2; -} - -// 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]; -} - -// Metadata automatically ingested from Google Cloud resources like BigQuery -// tables or Pub/Sub topics always uses enum values from `EntryType` as the type -// of entry. -// -// Other sources of metadata like Hive or Oracle databases can identify the type -// by either using one of the enum values from `EntryType` (for example, -// `FILESET` for a Cloud Storage fileset) or specifying a custom value using -// the [`Entry`](#resource:-entry) field `user_specified_type`. For more -// information, see -// [Surface files from Cloud Storage with fileset -// entries](/data-catalog/docs/how-to/filesets) or [Create custom entries for -// your data sources](/data-catalog/docs/how-to/custom-entries). -enum EntryType { - // Default unknown type. - ENTRY_TYPE_UNSPECIFIED = 0; - - // The entry type that has a GoogleSQL schema, including - // logical views. - TABLE = 2; - - // The type of models. - // - // For more information, see [Supported models in BigQuery - // ML](/bigquery/docs/bqml-introduction#supported_models). - 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; - - // Connection to a data source. For example, a BigQuery - // connection. - DATA_SOURCE_CONNECTION = 8; - - // 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; - - // Schema within a relational database. - DATABASE_SCHEMA = 15; - - // A Dashboard, for example from Looker. - DASHBOARD = 16; - - // A Looker Explore. - // - // For more information, see [Looker Explore API] - // (https://developers.looker.com/api/explorer/4.0/methods/LookmlModel/lookml_model_explore). - EXPLORE = 17; - - // A Looker Look. - // - // For more information, see [Looker Look API] - // (https://developers.looker.com/api/explorer/4.0/methods/Look). - LOOK = 18; - - // Feature Online Store resource in Vertex AI Feature Store. - FEATURE_ONLINE_STORE = 19; - - // Feature View resource in Vertex AI Feature Store. - FEATURE_VIEW = 20; - - // Feature Group resource in Vertex AI Feature Store. - FEATURE_GROUP = 21; -} - -// Request message for -// [SetConfig][google.cloud.datacatalog.v1.DataCatalog.SetConfig]. -message SetConfigRequest { - // Required. The organization or project whose config is being specified. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // The configuration field to set. - oneof configuration { - // Opt-in status for the migration of Tag Templates to Dataplex. - TagTemplateMigration tag_template_migration = 2; - - // Opt-in status for the UI switch to Dataplex. - CatalogUIExperience catalog_ui_experience = 3; - } -} - -// Request message for -// [RetrieveConfig][google.cloud.datacatalog.v1.DataCatalog.RetrieveConfig]. -message RetrieveConfigRequest { - // Required. The organization whose config is being retrieved. - string name = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [RetrieveEffectiveConfig][google.cloud.datacatalog.v1.DataCatalog.RetrieveEffectiveConfig]. -message RetrieveEffectiveConfigRequest { - // Required. The resource whose effective config is being retrieved. - string name = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Configuration related to the opt-in status for the migration of TagTemplates -// to Dataplex. -enum TagTemplateMigration { - // Default value. Migration of Tag Templates from Data Catalog to Dataplex is - // not performed. - TAG_TEMPLATE_MIGRATION_UNSPECIFIED = 0; - - // Migration of Tag Templates from Data Catalog to Dataplex is enabled. - TAG_TEMPLATE_MIGRATION_ENABLED = 1; - - // Migration of Tag Templates from Data Catalog to Dataplex is disabled. - TAG_TEMPLATE_MIGRATION_DISABLED = 2; -} - -// Configuration related to the opt-in status for the UI switch to Dataplex. -enum CatalogUIExperience { - // Default value. The default UI is Dataplex. - CATALOG_UI_EXPERIENCE_UNSPECIFIED = 0; - - // The UI is Dataplex. - CATALOG_UI_EXPERIENCE_ENABLED = 1; - - // The UI is Data Catalog. - CATALOG_UI_EXPERIENCE_DISABLED = 2; -} - -// The configuration related to the migration from Data Catalog to Dataplex that -// has been applied to an organization and any projects under it. It is the -// response message for -// [RetrieveConfig][google.cloud.datacatalog.v1.DataCatalog.RetrieveConfig]. -message OrganizationConfig { - // Map of organizations and project resource names and their configuration. - // The format for the map keys is `organizations/{organizationId}` or - // `projects/{projectId}`. - map config = 1; -} - -// The configuration related to the migration to Dataplex applied to an -// organization or project. -// It is the response message for -// [SetConfig][google.cloud.datacatalog.v1.DataCatalog.SetConfig] and -// [RetrieveEffectiveConfig][google.cloud.datacatalog.v1.DataCatalog.RetrieveEffectiveConfig]. -message MigrationConfig { - // Opt-in status for the migration of Tag Templates to Dataplex. - TagTemplateMigration tag_template_migration = 1; - - // Opt-in status for the UI switch to Dataplex. - CatalogUIExperience catalog_ui_experience = 2; -} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/dataplex_spec.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/dataplex_spec.proto deleted file mode 100644 index ce10b33eda7..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/dataplex_spec.proto +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1; - -import "google/cloud/datacatalog/v1/common.proto"; -import "google/cloud/datacatalog/v1/physical_schema.proto"; - -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; -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/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/dump_content.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/dump_content.proto deleted file mode 100644 index 87afabf0a48..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/dump_content.proto +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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/datacatalog.proto"; -import "google/cloud/datacatalog/v1/tags.proto"; - -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; -option java_multiple_files = true; -option java_outer_classname = "DumpContentProto"; -option java_package = "com.google.cloud.datacatalog.v1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; -option ruby_package = "Google::Cloud::DataCatalog::V1"; - -// Wrapper containing Entry and information about Tags -// that should and should not be attached to it. -message TaggedEntry { - // Required. Entry to be ingested. - oneof entry { - // Non-encrypted Data Catalog v1 Entry. - Entry v1_entry = 1; - } - - // Optional. Tags that should be ingested into the Data Catalog. - // Caller should populate template name, column and fields. - repeated Tag present_tags = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Tags that should be deleted from the Data Catalog. - // Caller should populate template name and column only. - repeated Tag absent_tags = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Wrapper for any item that can be contained in the dump. -message DumpItem { - oneof item { - // Entry and its tags. - TaggedEntry tagged_entry = 1; - } -} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/gcs_fileset_spec.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/gcs_fileset_spec.proto deleted file mode 100644 index 67bedae49d5..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/gcs_fileset_spec.proto +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1; - -import "google/api/field_behavior.proto"; -import "google/cloud/datacatalog/v1/timestamps.proto"; - -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; -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/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/physical_schema.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/physical_schema.proto deleted file mode 100644 index 89a9cd5e820..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/physical_schema.proto +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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 csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; -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/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/policytagmanager.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/policytagmanager.proto deleted file mode 100644 index e97ddb7cd1a..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/policytagmanager.proto +++ /dev/null @@ -1,506 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.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/common.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 csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; -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; - } - - // The source system of the Taxonomy. - message Service { - // The Google Cloud service name. - ManagingSystem name = 1; - - // The service agent for the service. - string identity = 2; - } - - // Identifier. Resource name of this taxonomy in URL format. - // - // Note: Policy tag manager generates unique taxonomy IDs. - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // 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]; - - // Output only. Identity of the service which owns the Taxonomy. This field is - // only populated when the taxonomy is created by a Google Cloud service. - // Currently only 'DATAPLEX' is supported. - Service service = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// 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}" - }; - - // Identifier. 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) = IDENTIFIER]; - - // 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; - - // Supported field for filter is 'service' and value is 'dataplex'. - // Eg: service=dataplex. - string filter = 4; -} - -// 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/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/policytagmanagerserialization.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/policytagmanagerserialization.proto deleted file mode 100644 index aac2d469f23..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/policytagmanagerserialization.proto +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.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 csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; -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/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/schema.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/schema.proto deleted file mode 100644 index e0d735d626d..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/schema.proto +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1; - -import "google/api/field_behavior.proto"; - -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; -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 { - // Specifies inclusion of the column in an index - enum IndexingType { - // Unspecified. - INDEXING_TYPE_UNSPECIFIED = 0; - - // Column not a part of an index. - INDEXING_TYPE_NONE = 1; - - // Column Part of non unique index. - INDEXING_TYPE_NON_UNIQUE = 2; - - // Column part of unique index. - INDEXING_TYPE_UNIQUE = 3; - - // Column part of the primary key. - INDEXING_TYPE_PRIMARY_KEY = 4; - } - - // Column info specific to Looker System. - message LookerColumnSpec { - // Column type in Looker. - enum LookerColumnType { - // Unspecified. - LOOKER_COLUMN_TYPE_UNSPECIFIED = 0; - - // Dimension. - DIMENSION = 1; - - // Dimension group - parent for Dimension. - DIMENSION_GROUP = 2; - - // Filter. - FILTER = 3; - - // Measure. - MEASURE = 4; - - // Parameter. - PARAMETER = 5; - } - - // Looker specific column type of this column. - LookerColumnType type = 1; - } - - // Represents the type of a field element. - message FieldElementType { - // Required. The type of a field element. See - // [ColumnSchema.type][google.cloud.datacatalog.v1.ColumnSchema.type]. - string type = 1 [(google.api.field_behavior) = REQUIRED]; - } - - // 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. Default value for the column. - string default_value = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Ordinal position - int32 ordinal_position = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Most important inclusion of this column. - IndexingType highest_indexing_type = 10 - [(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]; - - // Information only applying for columns in Entries from a specific system. - oneof system_spec { - // Looker specific column info of this column. - LookerColumnSpec looker_column_spec = 18; - } - - // Optional. The subtype of the RANGE, if the type of this field is RANGE. If - // the type is RANGE, this field is required. Possible values for the field - // element type of a RANGE include: - // * DATE - // * DATETIME - // * TIMESTAMP - FieldElementType range_element_type = 19 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Garbage collection policy for the column or column family. - // Applies to systems like Cloud Bigtable. - string gc_rule = 11 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/search.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/search.proto deleted file mode 100644 index 2ebd8851123..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/search.proto +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1; - -import "google/api/field_behavior.proto"; -import "google/cloud/datacatalog/v1/common.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; -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/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/table_spec.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/table_spec.proto deleted file mode 100644 index 912f752096c..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/table_spec.proto +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; - -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; -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/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/tags.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/tags.proto deleted file mode 100644 index de175d32c9e..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/tags.proto +++ /dev/null @@ -1,307 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; -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}" - }; - - // Identifier. 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 [(google.api.field_behavior) = IDENTIFIER]; - - // 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]; - - // Output only. Denotes the transfer status of the Tag Template. - TagTemplate.DataplexTransferStatus dataplex_transfer_status = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// 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 Google Cloud -// 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}" - }; - - // This enum describes TagTemplate transfer status to Dataplex service. - enum DataplexTransferStatus { - // Default value. TagTemplate and its tags are only visible and editable in - // DataCatalog. - DATAPLEX_TRANSFER_STATUS_UNSPECIFIED = 0; - - // TagTemplate and its tags are auto-copied to Dataplex service. - // Visible in both services. Editable in DataCatalog, read-only in Dataplex. - // Deprecated: Individual TagTemplate migration is deprecated in favor of - // organization or project wide TagTemplate migration opt-in. - MIGRATED = 1 [deprecated = true]; - - // TagTemplate and its tags are auto-copied to Dataplex service. - // Visible in both services. Editable in Dataplex, read-only in DataCatalog. - TRANSFERRED = 2; - } - - // Identifier. 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 [(google.api.field_behavior) = IDENTIFIER]; - - // 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.DataCatalog.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]; - - // Optional. Transfer status of the TagTemplate - DataplexTransferStatus dataplex_transfer_status = 7 - [(google.api.field_behavior) = OPTIONAL]; -} - -// 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}" - }; - - // Identifier. 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) = IDENTIFIER]; - - // 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/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/timestamps.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/timestamps.proto deleted file mode 100644 index e14cf432142..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/timestamps.proto +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1; - -import "google/api/field_behavior.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; -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/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/usage.proto b/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/usage.proto deleted file mode 100644 index 145606070b2..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/protos/google/cloud/datacatalog/v1/usage.proto +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1; - -import "google/api/field_behavior.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; -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; -} - -// Common statistics on the entry's usage. -// -// They can be set on any system. -message CommonUsageStats { - // View count in source system. - optional int64 view_count = 1; -} - -// 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]; - - // Common usage statistics over each of the predefined time ranges. - // - // Supported time ranges are `{"24H", "7D", "30D", "Lifetime"}`. - map common_usage_within_time_range = 3; - - // Favorite count in the source system. - optional int64 favorite_count = 4; -} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/protos/protos.d.ts b/owl-bot-staging/google-cloud-datacatalog/v1/protos/protos.d.ts deleted file mode 100644 index dd97c0739b2..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/protos/protos.d.ts +++ /dev/null @@ -1,25619 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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, - CLOUD_SPANNER = 6, - CLOUD_BIGTABLE = 7, - CLOUD_SQL = 8, - LOOKER = 9, - VERTEX_AI = 10 - } - - /** ManagingSystem enum. */ - enum ManagingSystem { - MANAGING_SYSTEM_UNSPECIFIED = 0, - MANAGING_SYSTEM_DATAPLEX = 1, - MANAGING_SYSTEM_OTHER = 2 - } - - /** 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 ReconcileTags. - * @param request ReconcileTagsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public reconcileTags(request: google.cloud.datacatalog.v1.IReconcileTagsRequest, callback: google.cloud.datacatalog.v1.DataCatalog.ReconcileTagsCallback): void; - - /** - * Calls ReconcileTags. - * @param request ReconcileTagsRequest message or plain object - * @returns Promise - */ - public reconcileTags(request: google.cloud.datacatalog.v1.IReconcileTagsRequest): 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; - - /** - * Calls ImportEntries. - * @param request ImportEntriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public importEntries(request: google.cloud.datacatalog.v1.IImportEntriesRequest, callback: google.cloud.datacatalog.v1.DataCatalog.ImportEntriesCallback): void; - - /** - * Calls ImportEntries. - * @param request ImportEntriesRequest message or plain object - * @returns Promise - */ - public importEntries(request: google.cloud.datacatalog.v1.IImportEntriesRequest): Promise; - - /** - * Calls SetConfig. - * @param request SetConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and MigrationConfig - */ - public setConfig(request: google.cloud.datacatalog.v1.ISetConfigRequest, callback: google.cloud.datacatalog.v1.DataCatalog.SetConfigCallback): void; - - /** - * Calls SetConfig. - * @param request SetConfigRequest message or plain object - * @returns Promise - */ - public setConfig(request: google.cloud.datacatalog.v1.ISetConfigRequest): Promise; - - /** - * Calls RetrieveConfig. - * @param request RetrieveConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and OrganizationConfig - */ - public retrieveConfig(request: google.cloud.datacatalog.v1.IRetrieveConfigRequest, callback: google.cloud.datacatalog.v1.DataCatalog.RetrieveConfigCallback): void; - - /** - * Calls RetrieveConfig. - * @param request RetrieveConfigRequest message or plain object - * @returns Promise - */ - public retrieveConfig(request: google.cloud.datacatalog.v1.IRetrieveConfigRequest): Promise; - - /** - * Calls RetrieveEffectiveConfig. - * @param request RetrieveEffectiveConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and MigrationConfig - */ - public retrieveEffectiveConfig(request: google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest, callback: google.cloud.datacatalog.v1.DataCatalog.RetrieveEffectiveConfigCallback): void; - - /** - * Calls RetrieveEffectiveConfig. - * @param request RetrieveEffectiveConfigRequest message or plain object - * @returns Promise - */ - public retrieveEffectiveConfig(request: google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest): 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|reconcileTags}. - * @param error Error, if any - * @param [response] Operation - */ - type ReconcileTagsCallback = (error: (Error|null), response?: google.longrunning.Operation) => 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; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|importEntries}. - * @param error Error, if any - * @param [response] Operation - */ - type ImportEntriesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|setConfig}. - * @param error Error, if any - * @param [response] MigrationConfig - */ - type SetConfigCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.MigrationConfig) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|retrieveConfig}. - * @param error Error, if any - * @param [response] OrganizationConfig - */ - type RetrieveConfigCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.OrganizationConfig) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|retrieveEffectiveConfig}. - * @param error Error, if any - * @param [response] MigrationConfig - */ - type RetrieveEffectiveConfigCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.MigrationConfig) => 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); - - /** SearchCatalogRequest adminSearch */ - adminSearch?: (boolean|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; - - /** SearchCatalogRequest adminSearch. */ - public adminSearch: boolean; - - /** - * 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 totalSize */ - totalSize?: (number|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 totalSize. */ - public totalSize: number; - - /** 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); - - /** LookupEntryRequest project */ - project?: (string|null); - - /** LookupEntryRequest location */ - location?: (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 project. */ - public project: string; - - /** LookupEntryRequest location. */ - public location: string; - - /** 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 sqlDatabaseSystemSpec */ - sqlDatabaseSystemSpec?: (google.cloud.datacatalog.v1.ISqlDatabaseSystemSpec|null); - - /** Entry lookerSystemSpec */ - lookerSystemSpec?: (google.cloud.datacatalog.v1.ILookerSystemSpec|null); - - /** Entry cloudBigtableSystemSpec */ - cloudBigtableSystemSpec?: (google.cloud.datacatalog.v1.ICloudBigtableSystemSpec|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 datasetSpec */ - datasetSpec?: (google.cloud.datacatalog.v1.IDatasetSpec|null); - - /** Entry filesetSpec */ - filesetSpec?: (google.cloud.datacatalog.v1.IFilesetSpec|null); - - /** Entry serviceSpec */ - serviceSpec?: (google.cloud.datacatalog.v1.IServiceSpec|null); - - /** Entry modelSpec */ - modelSpec?: (google.cloud.datacatalog.v1.IModelSpec|null); - - /** Entry featureOnlineStoreSpec */ - featureOnlineStoreSpec?: (google.cloud.datacatalog.v1.IFeatureOnlineStoreSpec|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 sqlDatabaseSystemSpec. */ - public sqlDatabaseSystemSpec?: (google.cloud.datacatalog.v1.ISqlDatabaseSystemSpec|null); - - /** Entry lookerSystemSpec. */ - public lookerSystemSpec?: (google.cloud.datacatalog.v1.ILookerSystemSpec|null); - - /** Entry cloudBigtableSystemSpec. */ - public cloudBigtableSystemSpec?: (google.cloud.datacatalog.v1.ICloudBigtableSystemSpec|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 datasetSpec. */ - public datasetSpec?: (google.cloud.datacatalog.v1.IDatasetSpec|null); - - /** Entry filesetSpec. */ - public filesetSpec?: (google.cloud.datacatalog.v1.IFilesetSpec|null); - - /** Entry serviceSpec. */ - public serviceSpec?: (google.cloud.datacatalog.v1.IServiceSpec|null); - - /** Entry modelSpec. */ - public modelSpec?: (google.cloud.datacatalog.v1.IModelSpec|null); - - /** Entry featureOnlineStoreSpec. */ - public featureOnlineStoreSpec?: (google.cloud.datacatalog.v1.IFeatureOnlineStoreSpec|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 systemSpec. */ - public systemSpec?: ("sqlDatabaseSystemSpec"|"lookerSystemSpec"|"cloudBigtableSystemSpec"); - - /** Entry typeSpec. */ - public typeSpec?: ("gcsFilesetSpec"|"bigqueryTableSpec"|"bigqueryDateShardedSpec"); - - /** Entry spec. */ - public spec?: ("databaseTableSpec"|"dataSourceConnectionSpec"|"routineSpec"|"datasetSpec"|"filesetSpec"|"serviceSpec"|"modelSpec"|"featureOnlineStoreSpec"); - - /** - * 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); - - /** DatabaseTableSpec databaseViewSpec */ - databaseViewSpec?: (google.cloud.datacatalog.v1.DatabaseTableSpec.IDatabaseViewSpec|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); - - /** DatabaseTableSpec databaseViewSpec. */ - public databaseViewSpec?: (google.cloud.datacatalog.v1.DatabaseTableSpec.IDatabaseViewSpec|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 DatabaseViewSpec. */ - interface IDatabaseViewSpec { - - /** DatabaseViewSpec viewType */ - viewType?: (google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType|keyof typeof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType|null); - - /** DatabaseViewSpec baseTable */ - baseTable?: (string|null); - - /** DatabaseViewSpec sqlQuery */ - sqlQuery?: (string|null); - } - - /** Represents a DatabaseViewSpec. */ - class DatabaseViewSpec implements IDatabaseViewSpec { - - /** - * Constructs a new DatabaseViewSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.DatabaseTableSpec.IDatabaseViewSpec); - - /** DatabaseViewSpec viewType. */ - public viewType: (google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType|keyof typeof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType); - - /** DatabaseViewSpec baseTable. */ - public baseTable?: (string|null); - - /** DatabaseViewSpec sqlQuery. */ - public sqlQuery?: (string|null); - - /** DatabaseViewSpec sourceDefinition. */ - public sourceDefinition?: ("baseTable"|"sqlQuery"); - - /** - * Creates a new DatabaseViewSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns DatabaseViewSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.DatabaseTableSpec.IDatabaseViewSpec): google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec; - - /** - * Encodes the specified DatabaseViewSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.verify|verify} messages. - * @param message DatabaseViewSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.DatabaseTableSpec.IDatabaseViewSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DatabaseViewSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.verify|verify} messages. - * @param message DatabaseViewSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.DatabaseTableSpec.IDatabaseViewSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DatabaseViewSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DatabaseViewSpec - * @throws {Error} If the payload is not a 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.DatabaseViewSpec; - - /** - * Decodes a DatabaseViewSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DatabaseViewSpec - * @throws {Error} If the payload is 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.DatabaseViewSpec; - - /** - * Verifies a DatabaseViewSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DatabaseViewSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DatabaseViewSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec; - - /** - * Creates a plain object from a DatabaseViewSpec message. Also converts values to other types if specified. - * @param message DatabaseViewSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DatabaseViewSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DatabaseViewSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DatabaseViewSpec { - - /** ViewType enum. */ - enum ViewType { - VIEW_TYPE_UNSPECIFIED = 0, - STANDARD_VIEW = 1, - MATERIALIZED_VIEW = 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 DatasetSpec. */ - interface IDatasetSpec { - - /** DatasetSpec vertexDatasetSpec */ - vertexDatasetSpec?: (google.cloud.datacatalog.v1.IVertexDatasetSpec|null); - } - - /** Represents a DatasetSpec. */ - class DatasetSpec implements IDatasetSpec { - - /** - * Constructs a new DatasetSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IDatasetSpec); - - /** DatasetSpec vertexDatasetSpec. */ - public vertexDatasetSpec?: (google.cloud.datacatalog.v1.IVertexDatasetSpec|null); - - /** DatasetSpec systemSpec. */ - public systemSpec?: "vertexDatasetSpec"; - - /** - * Creates a new DatasetSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns DatasetSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IDatasetSpec): google.cloud.datacatalog.v1.DatasetSpec; - - /** - * Encodes the specified DatasetSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.DatasetSpec.verify|verify} messages. - * @param message DatasetSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IDatasetSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DatasetSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DatasetSpec.verify|verify} messages. - * @param message DatasetSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IDatasetSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DatasetSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DatasetSpec - * @throws {Error} If the payload is not a 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.DatasetSpec; - - /** - * Decodes a DatasetSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DatasetSpec - * @throws {Error} If the payload is 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.DatasetSpec; - - /** - * Verifies a DatasetSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DatasetSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DatasetSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.DatasetSpec; - - /** - * Creates a plain object from a DatasetSpec message. Also converts values to other types if specified. - * @param message DatasetSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.DatasetSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DatasetSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DatasetSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SqlDatabaseSystemSpec. */ - interface ISqlDatabaseSystemSpec { - - /** SqlDatabaseSystemSpec sqlEngine */ - sqlEngine?: (string|null); - - /** SqlDatabaseSystemSpec databaseVersion */ - databaseVersion?: (string|null); - - /** SqlDatabaseSystemSpec instanceHost */ - instanceHost?: (string|null); - } - - /** Represents a SqlDatabaseSystemSpec. */ - class SqlDatabaseSystemSpec implements ISqlDatabaseSystemSpec { - - /** - * Constructs a new SqlDatabaseSystemSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ISqlDatabaseSystemSpec); - - /** SqlDatabaseSystemSpec sqlEngine. */ - public sqlEngine: string; - - /** SqlDatabaseSystemSpec databaseVersion. */ - public databaseVersion: string; - - /** SqlDatabaseSystemSpec instanceHost. */ - public instanceHost: string; - - /** - * Creates a new SqlDatabaseSystemSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns SqlDatabaseSystemSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ISqlDatabaseSystemSpec): google.cloud.datacatalog.v1.SqlDatabaseSystemSpec; - - /** - * Encodes the specified SqlDatabaseSystemSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.SqlDatabaseSystemSpec.verify|verify} messages. - * @param message SqlDatabaseSystemSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ISqlDatabaseSystemSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SqlDatabaseSystemSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.SqlDatabaseSystemSpec.verify|verify} messages. - * @param message SqlDatabaseSystemSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ISqlDatabaseSystemSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SqlDatabaseSystemSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SqlDatabaseSystemSpec - * @throws {Error} If the payload is not a 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.SqlDatabaseSystemSpec; - - /** - * Decodes a SqlDatabaseSystemSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SqlDatabaseSystemSpec - * @throws {Error} If the payload is 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.SqlDatabaseSystemSpec; - - /** - * Verifies a SqlDatabaseSystemSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SqlDatabaseSystemSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SqlDatabaseSystemSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.SqlDatabaseSystemSpec; - - /** - * Creates a plain object from a SqlDatabaseSystemSpec message. Also converts values to other types if specified. - * @param message SqlDatabaseSystemSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.SqlDatabaseSystemSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SqlDatabaseSystemSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SqlDatabaseSystemSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LookerSystemSpec. */ - interface ILookerSystemSpec { - - /** LookerSystemSpec parentInstanceId */ - parentInstanceId?: (string|null); - - /** LookerSystemSpec parentInstanceDisplayName */ - parentInstanceDisplayName?: (string|null); - - /** LookerSystemSpec parentModelId */ - parentModelId?: (string|null); - - /** LookerSystemSpec parentModelDisplayName */ - parentModelDisplayName?: (string|null); - - /** LookerSystemSpec parentViewId */ - parentViewId?: (string|null); - - /** LookerSystemSpec parentViewDisplayName */ - parentViewDisplayName?: (string|null); - } - - /** Represents a LookerSystemSpec. */ - class LookerSystemSpec implements ILookerSystemSpec { - - /** - * Constructs a new LookerSystemSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ILookerSystemSpec); - - /** LookerSystemSpec parentInstanceId. */ - public parentInstanceId: string; - - /** LookerSystemSpec parentInstanceDisplayName. */ - public parentInstanceDisplayName: string; - - /** LookerSystemSpec parentModelId. */ - public parentModelId: string; - - /** LookerSystemSpec parentModelDisplayName. */ - public parentModelDisplayName: string; - - /** LookerSystemSpec parentViewId. */ - public parentViewId: string; - - /** LookerSystemSpec parentViewDisplayName. */ - public parentViewDisplayName: string; - - /** - * Creates a new LookerSystemSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns LookerSystemSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ILookerSystemSpec): google.cloud.datacatalog.v1.LookerSystemSpec; - - /** - * Encodes the specified LookerSystemSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.LookerSystemSpec.verify|verify} messages. - * @param message LookerSystemSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ILookerSystemSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LookerSystemSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.LookerSystemSpec.verify|verify} messages. - * @param message LookerSystemSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ILookerSystemSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LookerSystemSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LookerSystemSpec - * @throws {Error} If the payload is not a 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.LookerSystemSpec; - - /** - * Decodes a LookerSystemSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LookerSystemSpec - * @throws {Error} If the payload is 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.LookerSystemSpec; - - /** - * Verifies a LookerSystemSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LookerSystemSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LookerSystemSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.LookerSystemSpec; - - /** - * Creates a plain object from a LookerSystemSpec message. Also converts values to other types if specified. - * @param message LookerSystemSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.LookerSystemSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LookerSystemSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LookerSystemSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudBigtableSystemSpec. */ - interface ICloudBigtableSystemSpec { - - /** CloudBigtableSystemSpec instanceDisplayName */ - instanceDisplayName?: (string|null); - } - - /** Represents a CloudBigtableSystemSpec. */ - class CloudBigtableSystemSpec implements ICloudBigtableSystemSpec { - - /** - * Constructs a new CloudBigtableSystemSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ICloudBigtableSystemSpec); - - /** CloudBigtableSystemSpec instanceDisplayName. */ - public instanceDisplayName: string; - - /** - * Creates a new CloudBigtableSystemSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudBigtableSystemSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ICloudBigtableSystemSpec): google.cloud.datacatalog.v1.CloudBigtableSystemSpec; - - /** - * Encodes the specified CloudBigtableSystemSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.CloudBigtableSystemSpec.verify|verify} messages. - * @param message CloudBigtableSystemSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ICloudBigtableSystemSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudBigtableSystemSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CloudBigtableSystemSpec.verify|verify} messages. - * @param message CloudBigtableSystemSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ICloudBigtableSystemSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudBigtableSystemSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudBigtableSystemSpec - * @throws {Error} If the payload is not a 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.CloudBigtableSystemSpec; - - /** - * Decodes a CloudBigtableSystemSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudBigtableSystemSpec - * @throws {Error} If the payload is 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.CloudBigtableSystemSpec; - - /** - * Verifies a CloudBigtableSystemSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudBigtableSystemSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudBigtableSystemSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.CloudBigtableSystemSpec; - - /** - * Creates a plain object from a CloudBigtableSystemSpec message. Also converts values to other types if specified. - * @param message CloudBigtableSystemSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.CloudBigtableSystemSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudBigtableSystemSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudBigtableSystemSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudBigtableInstanceSpec. */ - interface ICloudBigtableInstanceSpec { - - /** CloudBigtableInstanceSpec cloudBigtableClusterSpecs */ - cloudBigtableClusterSpecs?: (google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.ICloudBigtableClusterSpec[]|null); - } - - /** Represents a CloudBigtableInstanceSpec. */ - class CloudBigtableInstanceSpec implements ICloudBigtableInstanceSpec { - - /** - * Constructs a new CloudBigtableInstanceSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ICloudBigtableInstanceSpec); - - /** CloudBigtableInstanceSpec cloudBigtableClusterSpecs. */ - public cloudBigtableClusterSpecs: google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.ICloudBigtableClusterSpec[]; - - /** - * Creates a new CloudBigtableInstanceSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudBigtableInstanceSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ICloudBigtableInstanceSpec): google.cloud.datacatalog.v1.CloudBigtableInstanceSpec; - - /** - * Encodes the specified CloudBigtableInstanceSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.verify|verify} messages. - * @param message CloudBigtableInstanceSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ICloudBigtableInstanceSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudBigtableInstanceSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.verify|verify} messages. - * @param message CloudBigtableInstanceSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ICloudBigtableInstanceSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudBigtableInstanceSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudBigtableInstanceSpec - * @throws {Error} If the payload is not a 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.CloudBigtableInstanceSpec; - - /** - * Decodes a CloudBigtableInstanceSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudBigtableInstanceSpec - * @throws {Error} If the payload is 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.CloudBigtableInstanceSpec; - - /** - * Verifies a CloudBigtableInstanceSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudBigtableInstanceSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudBigtableInstanceSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.CloudBigtableInstanceSpec; - - /** - * Creates a plain object from a CloudBigtableInstanceSpec message. Also converts values to other types if specified. - * @param message CloudBigtableInstanceSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.CloudBigtableInstanceSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudBigtableInstanceSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudBigtableInstanceSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CloudBigtableInstanceSpec { - - /** Properties of a CloudBigtableClusterSpec. */ - interface ICloudBigtableClusterSpec { - - /** CloudBigtableClusterSpec displayName */ - displayName?: (string|null); - - /** CloudBigtableClusterSpec location */ - location?: (string|null); - - /** CloudBigtableClusterSpec type */ - type?: (string|null); - - /** CloudBigtableClusterSpec linkedResource */ - linkedResource?: (string|null); - } - - /** Represents a CloudBigtableClusterSpec. */ - class CloudBigtableClusterSpec implements ICloudBigtableClusterSpec { - - /** - * Constructs a new CloudBigtableClusterSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.ICloudBigtableClusterSpec); - - /** CloudBigtableClusterSpec displayName. */ - public displayName: string; - - /** CloudBigtableClusterSpec location. */ - public location: string; - - /** CloudBigtableClusterSpec type. */ - public type: string; - - /** CloudBigtableClusterSpec linkedResource. */ - public linkedResource: string; - - /** - * Creates a new CloudBigtableClusterSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudBigtableClusterSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.ICloudBigtableClusterSpec): google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec; - - /** - * Encodes the specified CloudBigtableClusterSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec.verify|verify} messages. - * @param message CloudBigtableClusterSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.ICloudBigtableClusterSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudBigtableClusterSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec.verify|verify} messages. - * @param message CloudBigtableClusterSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.ICloudBigtableClusterSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudBigtableClusterSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudBigtableClusterSpec - * @throws {Error} If the payload is not a 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.CloudBigtableInstanceSpec.CloudBigtableClusterSpec; - - /** - * Decodes a CloudBigtableClusterSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudBigtableClusterSpec - * @throws {Error} If the payload is 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.CloudBigtableInstanceSpec.CloudBigtableClusterSpec; - - /** - * Verifies a CloudBigtableClusterSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudBigtableClusterSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudBigtableClusterSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec; - - /** - * Creates a plain object from a CloudBigtableClusterSpec message. Also converts values to other types if specified. - * @param message CloudBigtableClusterSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudBigtableClusterSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudBigtableClusterSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a ServiceSpec. */ - interface IServiceSpec { - - /** ServiceSpec cloudBigtableInstanceSpec */ - cloudBigtableInstanceSpec?: (google.cloud.datacatalog.v1.ICloudBigtableInstanceSpec|null); - } - - /** Represents a ServiceSpec. */ - class ServiceSpec implements IServiceSpec { - - /** - * Constructs a new ServiceSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IServiceSpec); - - /** ServiceSpec cloudBigtableInstanceSpec. */ - public cloudBigtableInstanceSpec?: (google.cloud.datacatalog.v1.ICloudBigtableInstanceSpec|null); - - /** ServiceSpec systemSpec. */ - public systemSpec?: "cloudBigtableInstanceSpec"; - - /** - * Creates a new ServiceSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IServiceSpec): google.cloud.datacatalog.v1.ServiceSpec; - - /** - * Encodes the specified ServiceSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.ServiceSpec.verify|verify} messages. - * @param message ServiceSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IServiceSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ServiceSpec.verify|verify} messages. - * @param message ServiceSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IServiceSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceSpec - * @throws {Error} If the payload is not a 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.ServiceSpec; - - /** - * Decodes a ServiceSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceSpec - * @throws {Error} If the payload is 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.ServiceSpec; - - /** - * Verifies a ServiceSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ServiceSpec; - - /** - * Creates a plain object from a ServiceSpec message. Also converts values to other types if specified. - * @param message ServiceSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ServiceSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VertexModelSourceInfo. */ - interface IVertexModelSourceInfo { - - /** VertexModelSourceInfo sourceType */ - sourceType?: (google.cloud.datacatalog.v1.VertexModelSourceInfo.ModelSourceType|keyof typeof google.cloud.datacatalog.v1.VertexModelSourceInfo.ModelSourceType|null); - - /** VertexModelSourceInfo copy */ - copy?: (boolean|null); - } - - /** Represents a VertexModelSourceInfo. */ - class VertexModelSourceInfo implements IVertexModelSourceInfo { - - /** - * Constructs a new VertexModelSourceInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IVertexModelSourceInfo); - - /** VertexModelSourceInfo sourceType. */ - public sourceType: (google.cloud.datacatalog.v1.VertexModelSourceInfo.ModelSourceType|keyof typeof google.cloud.datacatalog.v1.VertexModelSourceInfo.ModelSourceType); - - /** VertexModelSourceInfo copy. */ - public copy: boolean; - - /** - * Creates a new VertexModelSourceInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns VertexModelSourceInfo instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IVertexModelSourceInfo): google.cloud.datacatalog.v1.VertexModelSourceInfo; - - /** - * Encodes the specified VertexModelSourceInfo message. Does not implicitly {@link google.cloud.datacatalog.v1.VertexModelSourceInfo.verify|verify} messages. - * @param message VertexModelSourceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IVertexModelSourceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VertexModelSourceInfo message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.VertexModelSourceInfo.verify|verify} messages. - * @param message VertexModelSourceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IVertexModelSourceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VertexModelSourceInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VertexModelSourceInfo - * @throws {Error} If the payload is not a 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.VertexModelSourceInfo; - - /** - * Decodes a VertexModelSourceInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VertexModelSourceInfo - * @throws {Error} If the payload is 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.VertexModelSourceInfo; - - /** - * Verifies a VertexModelSourceInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VertexModelSourceInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VertexModelSourceInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.VertexModelSourceInfo; - - /** - * Creates a plain object from a VertexModelSourceInfo message. Also converts values to other types if specified. - * @param message VertexModelSourceInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.VertexModelSourceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VertexModelSourceInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VertexModelSourceInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace VertexModelSourceInfo { - - /** ModelSourceType enum. */ - enum ModelSourceType { - MODEL_SOURCE_TYPE_UNSPECIFIED = 0, - AUTOML = 1, - CUSTOM = 2, - BQML = 3, - MODEL_GARDEN = 4, - GENIE = 5, - CUSTOM_TEXT_EMBEDDING = 6, - MARKETPLACE = 7 - } - } - - /** Properties of a VertexModelSpec. */ - interface IVertexModelSpec { - - /** VertexModelSpec versionId */ - versionId?: (string|null); - - /** VertexModelSpec versionAliases */ - versionAliases?: (string[]|null); - - /** VertexModelSpec versionDescription */ - versionDescription?: (string|null); - - /** VertexModelSpec vertexModelSourceInfo */ - vertexModelSourceInfo?: (google.cloud.datacatalog.v1.IVertexModelSourceInfo|null); - - /** VertexModelSpec containerImageUri */ - containerImageUri?: (string|null); - } - - /** Represents a VertexModelSpec. */ - class VertexModelSpec implements IVertexModelSpec { - - /** - * Constructs a new VertexModelSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IVertexModelSpec); - - /** VertexModelSpec versionId. */ - public versionId: string; - - /** VertexModelSpec versionAliases. */ - public versionAliases: string[]; - - /** VertexModelSpec versionDescription. */ - public versionDescription: string; - - /** VertexModelSpec vertexModelSourceInfo. */ - public vertexModelSourceInfo?: (google.cloud.datacatalog.v1.IVertexModelSourceInfo|null); - - /** VertexModelSpec containerImageUri. */ - public containerImageUri: string; - - /** - * Creates a new VertexModelSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns VertexModelSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IVertexModelSpec): google.cloud.datacatalog.v1.VertexModelSpec; - - /** - * Encodes the specified VertexModelSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.VertexModelSpec.verify|verify} messages. - * @param message VertexModelSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IVertexModelSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VertexModelSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.VertexModelSpec.verify|verify} messages. - * @param message VertexModelSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IVertexModelSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VertexModelSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VertexModelSpec - * @throws {Error} If the payload is not a 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.VertexModelSpec; - - /** - * Decodes a VertexModelSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VertexModelSpec - * @throws {Error} If the payload is 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.VertexModelSpec; - - /** - * Verifies a VertexModelSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VertexModelSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VertexModelSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.VertexModelSpec; - - /** - * Creates a plain object from a VertexModelSpec message. Also converts values to other types if specified. - * @param message VertexModelSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.VertexModelSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VertexModelSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VertexModelSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VertexDatasetSpec. */ - interface IVertexDatasetSpec { - - /** VertexDatasetSpec dataItemCount */ - dataItemCount?: (number|Long|string|null); - - /** VertexDatasetSpec dataType */ - dataType?: (google.cloud.datacatalog.v1.VertexDatasetSpec.DataType|keyof typeof google.cloud.datacatalog.v1.VertexDatasetSpec.DataType|null); - } - - /** Represents a VertexDatasetSpec. */ - class VertexDatasetSpec implements IVertexDatasetSpec { - - /** - * Constructs a new VertexDatasetSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IVertexDatasetSpec); - - /** VertexDatasetSpec dataItemCount. */ - public dataItemCount: (number|Long|string); - - /** VertexDatasetSpec dataType. */ - public dataType: (google.cloud.datacatalog.v1.VertexDatasetSpec.DataType|keyof typeof google.cloud.datacatalog.v1.VertexDatasetSpec.DataType); - - /** - * Creates a new VertexDatasetSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns VertexDatasetSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IVertexDatasetSpec): google.cloud.datacatalog.v1.VertexDatasetSpec; - - /** - * Encodes the specified VertexDatasetSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.VertexDatasetSpec.verify|verify} messages. - * @param message VertexDatasetSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IVertexDatasetSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VertexDatasetSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.VertexDatasetSpec.verify|verify} messages. - * @param message VertexDatasetSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IVertexDatasetSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VertexDatasetSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VertexDatasetSpec - * @throws {Error} If the payload is not a 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.VertexDatasetSpec; - - /** - * Decodes a VertexDatasetSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VertexDatasetSpec - * @throws {Error} If the payload is 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.VertexDatasetSpec; - - /** - * Verifies a VertexDatasetSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VertexDatasetSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VertexDatasetSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.VertexDatasetSpec; - - /** - * Creates a plain object from a VertexDatasetSpec message. Also converts values to other types if specified. - * @param message VertexDatasetSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.VertexDatasetSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VertexDatasetSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VertexDatasetSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace VertexDatasetSpec { - - /** DataType enum. */ - enum DataType { - DATA_TYPE_UNSPECIFIED = 0, - TABLE = 1, - IMAGE = 2, - TEXT = 3, - VIDEO = 4, - CONVERSATION = 5, - TIME_SERIES = 6, - DOCUMENT = 7, - TEXT_TO_SPEECH = 8, - TRANSLATION = 9, - STORE_VISION = 10, - ENTERPRISE_KNOWLEDGE_GRAPH = 11, - TEXT_PROMPT = 12 - } - } - - /** Properties of a ModelSpec. */ - interface IModelSpec { - - /** ModelSpec vertexModelSpec */ - vertexModelSpec?: (google.cloud.datacatalog.v1.IVertexModelSpec|null); - } - - /** Represents a ModelSpec. */ - class ModelSpec implements IModelSpec { - - /** - * Constructs a new ModelSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IModelSpec); - - /** ModelSpec vertexModelSpec. */ - public vertexModelSpec?: (google.cloud.datacatalog.v1.IVertexModelSpec|null); - - /** ModelSpec systemSpec. */ - public systemSpec?: "vertexModelSpec"; - - /** - * Creates a new ModelSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns ModelSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IModelSpec): google.cloud.datacatalog.v1.ModelSpec; - - /** - * Encodes the specified ModelSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.ModelSpec.verify|verify} messages. - * @param message ModelSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IModelSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ModelSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ModelSpec.verify|verify} messages. - * @param message ModelSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IModelSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ModelSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ModelSpec - * @throws {Error} If the payload is not a 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.ModelSpec; - - /** - * Decodes a ModelSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ModelSpec - * @throws {Error} If the payload is 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.ModelSpec; - - /** - * Verifies a ModelSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ModelSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ModelSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ModelSpec; - - /** - * Creates a plain object from a ModelSpec message. Also converts values to other types if specified. - * @param message ModelSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ModelSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ModelSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ModelSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FeatureOnlineStoreSpec. */ - interface IFeatureOnlineStoreSpec { - - /** FeatureOnlineStoreSpec storageType */ - storageType?: (google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.StorageType|keyof typeof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.StorageType|null); - } - - /** Represents a FeatureOnlineStoreSpec. */ - class FeatureOnlineStoreSpec implements IFeatureOnlineStoreSpec { - - /** - * Constructs a new FeatureOnlineStoreSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IFeatureOnlineStoreSpec); - - /** FeatureOnlineStoreSpec storageType. */ - public storageType: (google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.StorageType|keyof typeof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.StorageType); - - /** - * Creates a new FeatureOnlineStoreSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureOnlineStoreSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IFeatureOnlineStoreSpec): google.cloud.datacatalog.v1.FeatureOnlineStoreSpec; - - /** - * Encodes the specified FeatureOnlineStoreSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.verify|verify} messages. - * @param message FeatureOnlineStoreSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IFeatureOnlineStoreSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureOnlineStoreSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.verify|verify} messages. - * @param message FeatureOnlineStoreSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IFeatureOnlineStoreSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureOnlineStoreSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureOnlineStoreSpec - * @throws {Error} If the payload is not a 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.FeatureOnlineStoreSpec; - - /** - * Decodes a FeatureOnlineStoreSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureOnlineStoreSpec - * @throws {Error} If the payload is 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.FeatureOnlineStoreSpec; - - /** - * Verifies a FeatureOnlineStoreSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureOnlineStoreSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureOnlineStoreSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.FeatureOnlineStoreSpec; - - /** - * Creates a plain object from a FeatureOnlineStoreSpec message. Also converts values to other types if specified. - * @param message FeatureOnlineStoreSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.FeatureOnlineStoreSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureOnlineStoreSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureOnlineStoreSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureOnlineStoreSpec { - - /** StorageType enum. */ - enum StorageType { - STORAGE_TYPE_UNSPECIFIED = 0, - BIGTABLE = 1, - OPTIMIZED = 2 - } - } - - /** 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); - - /** EntryGroup transferredToDataplex */ - transferredToDataplex?: (boolean|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); - - /** EntryGroup transferredToDataplex. */ - public transferredToDataplex: boolean; - - /** - * 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 ReconcileTagsRequest. */ - interface IReconcileTagsRequest { - - /** ReconcileTagsRequest parent */ - parent?: (string|null); - - /** ReconcileTagsRequest tagTemplate */ - tagTemplate?: (string|null); - - /** ReconcileTagsRequest forceDeleteMissing */ - forceDeleteMissing?: (boolean|null); - - /** ReconcileTagsRequest tags */ - tags?: (google.cloud.datacatalog.v1.ITag[]|null); - } - - /** Represents a ReconcileTagsRequest. */ - class ReconcileTagsRequest implements IReconcileTagsRequest { - - /** - * Constructs a new ReconcileTagsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IReconcileTagsRequest); - - /** ReconcileTagsRequest parent. */ - public parent: string; - - /** ReconcileTagsRequest tagTemplate. */ - public tagTemplate: string; - - /** ReconcileTagsRequest forceDeleteMissing. */ - public forceDeleteMissing: boolean; - - /** ReconcileTagsRequest tags. */ - public tags: google.cloud.datacatalog.v1.ITag[]; - - /** - * Creates a new ReconcileTagsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ReconcileTagsRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IReconcileTagsRequest): google.cloud.datacatalog.v1.ReconcileTagsRequest; - - /** - * Encodes the specified ReconcileTagsRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ReconcileTagsRequest.verify|verify} messages. - * @param message ReconcileTagsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IReconcileTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReconcileTagsRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ReconcileTagsRequest.verify|verify} messages. - * @param message ReconcileTagsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IReconcileTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReconcileTagsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReconcileTagsRequest - * @throws {Error} If the payload is not a 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.ReconcileTagsRequest; - - /** - * Decodes a ReconcileTagsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReconcileTagsRequest - * @throws {Error} If the payload is 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.ReconcileTagsRequest; - - /** - * Verifies a ReconcileTagsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReconcileTagsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReconcileTagsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ReconcileTagsRequest; - - /** - * Creates a plain object from a ReconcileTagsRequest message. Also converts values to other types if specified. - * @param message ReconcileTagsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ReconcileTagsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReconcileTagsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReconcileTagsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReconcileTagsResponse. */ - interface IReconcileTagsResponse { - - /** ReconcileTagsResponse createdTagsCount */ - createdTagsCount?: (number|Long|string|null); - - /** ReconcileTagsResponse updatedTagsCount */ - updatedTagsCount?: (number|Long|string|null); - - /** ReconcileTagsResponse deletedTagsCount */ - deletedTagsCount?: (number|Long|string|null); - } - - /** Represents a ReconcileTagsResponse. */ - class ReconcileTagsResponse implements IReconcileTagsResponse { - - /** - * Constructs a new ReconcileTagsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IReconcileTagsResponse); - - /** ReconcileTagsResponse createdTagsCount. */ - public createdTagsCount: (number|Long|string); - - /** ReconcileTagsResponse updatedTagsCount. */ - public updatedTagsCount: (number|Long|string); - - /** ReconcileTagsResponse deletedTagsCount. */ - public deletedTagsCount: (number|Long|string); - - /** - * Creates a new ReconcileTagsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ReconcileTagsResponse instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IReconcileTagsResponse): google.cloud.datacatalog.v1.ReconcileTagsResponse; - - /** - * Encodes the specified ReconcileTagsResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.ReconcileTagsResponse.verify|verify} messages. - * @param message ReconcileTagsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IReconcileTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReconcileTagsResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ReconcileTagsResponse.verify|verify} messages. - * @param message ReconcileTagsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IReconcileTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReconcileTagsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReconcileTagsResponse - * @throws {Error} If the payload is not a 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.ReconcileTagsResponse; - - /** - * Decodes a ReconcileTagsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReconcileTagsResponse - * @throws {Error} If the payload is 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.ReconcileTagsResponse; - - /** - * Verifies a ReconcileTagsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReconcileTagsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReconcileTagsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ReconcileTagsResponse; - - /** - * Creates a plain object from a ReconcileTagsResponse message. Also converts values to other types if specified. - * @param message ReconcileTagsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ReconcileTagsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReconcileTagsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReconcileTagsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReconcileTagsMetadata. */ - interface IReconcileTagsMetadata { - - /** ReconcileTagsMetadata state */ - state?: (google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState|keyof typeof google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState|null); - - /** ReconcileTagsMetadata errors */ - errors?: ({ [k: string]: google.rpc.IStatus }|null); - } - - /** Represents a ReconcileTagsMetadata. */ - class ReconcileTagsMetadata implements IReconcileTagsMetadata { - - /** - * Constructs a new ReconcileTagsMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IReconcileTagsMetadata); - - /** ReconcileTagsMetadata state. */ - public state: (google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState|keyof typeof google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState); - - /** ReconcileTagsMetadata errors. */ - public errors: { [k: string]: google.rpc.IStatus }; - - /** - * Creates a new ReconcileTagsMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns ReconcileTagsMetadata instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IReconcileTagsMetadata): google.cloud.datacatalog.v1.ReconcileTagsMetadata; - - /** - * Encodes the specified ReconcileTagsMetadata message. Does not implicitly {@link google.cloud.datacatalog.v1.ReconcileTagsMetadata.verify|verify} messages. - * @param message ReconcileTagsMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IReconcileTagsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReconcileTagsMetadata message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ReconcileTagsMetadata.verify|verify} messages. - * @param message ReconcileTagsMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IReconcileTagsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReconcileTagsMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReconcileTagsMetadata - * @throws {Error} If the payload is not a 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.ReconcileTagsMetadata; - - /** - * Decodes a ReconcileTagsMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReconcileTagsMetadata - * @throws {Error} If the payload is 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.ReconcileTagsMetadata; - - /** - * Verifies a ReconcileTagsMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReconcileTagsMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReconcileTagsMetadata - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ReconcileTagsMetadata; - - /** - * Creates a plain object from a ReconcileTagsMetadata message. Also converts values to other types if specified. - * @param message ReconcileTagsMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ReconcileTagsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReconcileTagsMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReconcileTagsMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ReconcileTagsMetadata { - - /** ReconciliationState enum. */ - enum ReconciliationState { - RECONCILIATION_STATE_UNSPECIFIED = 0, - RECONCILIATION_QUEUED = 1, - RECONCILIATION_IN_PROGRESS = 2, - RECONCILIATION_DONE = 3 - } - } - - /** 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 an ImportEntriesRequest. */ - interface IImportEntriesRequest { - - /** ImportEntriesRequest parent */ - parent?: (string|null); - - /** ImportEntriesRequest gcsBucketPath */ - gcsBucketPath?: (string|null); - - /** ImportEntriesRequest jobId */ - jobId?: (string|null); - } - - /** Represents an ImportEntriesRequest. */ - class ImportEntriesRequest implements IImportEntriesRequest { - - /** - * Constructs a new ImportEntriesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IImportEntriesRequest); - - /** ImportEntriesRequest parent. */ - public parent: string; - - /** ImportEntriesRequest gcsBucketPath. */ - public gcsBucketPath?: (string|null); - - /** ImportEntriesRequest jobId. */ - public jobId: string; - - /** ImportEntriesRequest source. */ - public source?: "gcsBucketPath"; - - /** - * Creates a new ImportEntriesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportEntriesRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IImportEntriesRequest): google.cloud.datacatalog.v1.ImportEntriesRequest; - - /** - * Encodes the specified ImportEntriesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ImportEntriesRequest.verify|verify} messages. - * @param message ImportEntriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IImportEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImportEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ImportEntriesRequest.verify|verify} messages. - * @param message ImportEntriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IImportEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ImportEntriesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImportEntriesRequest - * @throws {Error} If the payload is not a 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.ImportEntriesRequest; - - /** - * Decodes an ImportEntriesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportEntriesRequest - * @throws {Error} If the payload is 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.ImportEntriesRequest; - - /** - * Verifies an ImportEntriesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ImportEntriesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportEntriesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ImportEntriesRequest; - - /** - * Creates a plain object from an ImportEntriesRequest message. Also converts values to other types if specified. - * @param message ImportEntriesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ImportEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportEntriesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportEntriesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportEntriesResponse. */ - interface IImportEntriesResponse { - - /** ImportEntriesResponse upsertedEntriesCount */ - upsertedEntriesCount?: (number|Long|string|null); - - /** ImportEntriesResponse deletedEntriesCount */ - deletedEntriesCount?: (number|Long|string|null); - } - - /** Represents an ImportEntriesResponse. */ - class ImportEntriesResponse implements IImportEntriesResponse { - - /** - * Constructs a new ImportEntriesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IImportEntriesResponse); - - /** ImportEntriesResponse upsertedEntriesCount. */ - public upsertedEntriesCount?: (number|Long|string|null); - - /** ImportEntriesResponse deletedEntriesCount. */ - public deletedEntriesCount?: (number|Long|string|null); - - /** ImportEntriesResponse _upsertedEntriesCount. */ - public _upsertedEntriesCount?: "upsertedEntriesCount"; - - /** ImportEntriesResponse _deletedEntriesCount. */ - public _deletedEntriesCount?: "deletedEntriesCount"; - - /** - * Creates a new ImportEntriesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportEntriesResponse instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IImportEntriesResponse): google.cloud.datacatalog.v1.ImportEntriesResponse; - - /** - * Encodes the specified ImportEntriesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.ImportEntriesResponse.verify|verify} messages. - * @param message ImportEntriesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IImportEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImportEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ImportEntriesResponse.verify|verify} messages. - * @param message ImportEntriesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IImportEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ImportEntriesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImportEntriesResponse - * @throws {Error} If the payload is not a 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.ImportEntriesResponse; - - /** - * Decodes an ImportEntriesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportEntriesResponse - * @throws {Error} If the payload is 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.ImportEntriesResponse; - - /** - * Verifies an ImportEntriesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ImportEntriesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportEntriesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ImportEntriesResponse; - - /** - * Creates a plain object from an ImportEntriesResponse message. Also converts values to other types if specified. - * @param message ImportEntriesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ImportEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportEntriesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportEntriesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportEntriesMetadata. */ - interface IImportEntriesMetadata { - - /** ImportEntriesMetadata state */ - state?: (google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState|keyof typeof google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState|null); - - /** ImportEntriesMetadata errors */ - errors?: (google.rpc.IStatus[]|null); - } - - /** Represents an ImportEntriesMetadata. */ - class ImportEntriesMetadata implements IImportEntriesMetadata { - - /** - * Constructs a new ImportEntriesMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IImportEntriesMetadata); - - /** ImportEntriesMetadata state. */ - public state: (google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState|keyof typeof google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState); - - /** ImportEntriesMetadata errors. */ - public errors: google.rpc.IStatus[]; - - /** - * Creates a new ImportEntriesMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportEntriesMetadata instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IImportEntriesMetadata): google.cloud.datacatalog.v1.ImportEntriesMetadata; - - /** - * Encodes the specified ImportEntriesMetadata message. Does not implicitly {@link google.cloud.datacatalog.v1.ImportEntriesMetadata.verify|verify} messages. - * @param message ImportEntriesMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IImportEntriesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImportEntriesMetadata message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ImportEntriesMetadata.verify|verify} messages. - * @param message ImportEntriesMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IImportEntriesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ImportEntriesMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImportEntriesMetadata - * @throws {Error} If the payload is not a 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.ImportEntriesMetadata; - - /** - * Decodes an ImportEntriesMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportEntriesMetadata - * @throws {Error} If the payload is 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.ImportEntriesMetadata; - - /** - * Verifies an ImportEntriesMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ImportEntriesMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportEntriesMetadata - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ImportEntriesMetadata; - - /** - * Creates a plain object from an ImportEntriesMetadata message. Also converts values to other types if specified. - * @param message ImportEntriesMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ImportEntriesMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportEntriesMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportEntriesMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ImportEntriesMetadata { - - /** ImportState enum. */ - enum ImportState { - IMPORT_STATE_UNSPECIFIED = 0, - IMPORT_QUEUED = 1, - IMPORT_IN_PROGRESS = 2, - IMPORT_DONE = 3, - IMPORT_OBSOLETE = 4 - } - } - - /** 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, - DATABASE_SCHEMA = 15, - DASHBOARD = 16, - EXPLORE = 17, - LOOK = 18, - FEATURE_ONLINE_STORE = 19, - FEATURE_VIEW = 20, - FEATURE_GROUP = 21 - } - - /** Properties of a SetConfigRequest. */ - interface ISetConfigRequest { - - /** SetConfigRequest name */ - name?: (string|null); - - /** SetConfigRequest tagTemplateMigration */ - tagTemplateMigration?: (google.cloud.datacatalog.v1.TagTemplateMigration|keyof typeof google.cloud.datacatalog.v1.TagTemplateMigration|null); - - /** SetConfigRequest catalogUiExperience */ - catalogUiExperience?: (google.cloud.datacatalog.v1.CatalogUIExperience|keyof typeof google.cloud.datacatalog.v1.CatalogUIExperience|null); - } - - /** Represents a SetConfigRequest. */ - class SetConfigRequest implements ISetConfigRequest { - - /** - * Constructs a new SetConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ISetConfigRequest); - - /** SetConfigRequest name. */ - public name: string; - - /** SetConfigRequest tagTemplateMigration. */ - public tagTemplateMigration?: (google.cloud.datacatalog.v1.TagTemplateMigration|keyof typeof google.cloud.datacatalog.v1.TagTemplateMigration|null); - - /** SetConfigRequest catalogUiExperience. */ - public catalogUiExperience?: (google.cloud.datacatalog.v1.CatalogUIExperience|keyof typeof google.cloud.datacatalog.v1.CatalogUIExperience|null); - - /** SetConfigRequest configuration. */ - public configuration?: ("tagTemplateMigration"|"catalogUiExperience"); - - /** - * Creates a new SetConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetConfigRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ISetConfigRequest): google.cloud.datacatalog.v1.SetConfigRequest; - - /** - * Encodes the specified SetConfigRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.SetConfigRequest.verify|verify} messages. - * @param message SetConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ISetConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetConfigRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.SetConfigRequest.verify|verify} messages. - * @param message SetConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ISetConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetConfigRequest - * @throws {Error} If the payload is not a 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.SetConfigRequest; - - /** - * Decodes a SetConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetConfigRequest - * @throws {Error} If the payload is 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.SetConfigRequest; - - /** - * Verifies a SetConfigRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.SetConfigRequest; - - /** - * Creates a plain object from a SetConfigRequest message. Also converts values to other types if specified. - * @param message SetConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.SetConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RetrieveConfigRequest. */ - interface IRetrieveConfigRequest { - - /** RetrieveConfigRequest name */ - name?: (string|null); - } - - /** Represents a RetrieveConfigRequest. */ - class RetrieveConfigRequest implements IRetrieveConfigRequest { - - /** - * Constructs a new RetrieveConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IRetrieveConfigRequest); - - /** RetrieveConfigRequest name. */ - public name: string; - - /** - * Creates a new RetrieveConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RetrieveConfigRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IRetrieveConfigRequest): google.cloud.datacatalog.v1.RetrieveConfigRequest; - - /** - * Encodes the specified RetrieveConfigRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.RetrieveConfigRequest.verify|verify} messages. - * @param message RetrieveConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IRetrieveConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RetrieveConfigRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.RetrieveConfigRequest.verify|verify} messages. - * @param message RetrieveConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IRetrieveConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RetrieveConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RetrieveConfigRequest - * @throws {Error} If the payload is not a 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.RetrieveConfigRequest; - - /** - * Decodes a RetrieveConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RetrieveConfigRequest - * @throws {Error} If the payload is 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.RetrieveConfigRequest; - - /** - * Verifies a RetrieveConfigRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RetrieveConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RetrieveConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.RetrieveConfigRequest; - - /** - * Creates a plain object from a RetrieveConfigRequest message. Also converts values to other types if specified. - * @param message RetrieveConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.RetrieveConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RetrieveConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RetrieveConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RetrieveEffectiveConfigRequest. */ - interface IRetrieveEffectiveConfigRequest { - - /** RetrieveEffectiveConfigRequest name */ - name?: (string|null); - } - - /** Represents a RetrieveEffectiveConfigRequest. */ - class RetrieveEffectiveConfigRequest implements IRetrieveEffectiveConfigRequest { - - /** - * Constructs a new RetrieveEffectiveConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest); - - /** RetrieveEffectiveConfigRequest name. */ - public name: string; - - /** - * Creates a new RetrieveEffectiveConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RetrieveEffectiveConfigRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest): google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest; - - /** - * Encodes the specified RetrieveEffectiveConfigRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest.verify|verify} messages. - * @param message RetrieveEffectiveConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RetrieveEffectiveConfigRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest.verify|verify} messages. - * @param message RetrieveEffectiveConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RetrieveEffectiveConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RetrieveEffectiveConfigRequest - * @throws {Error} If the payload is not a 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.RetrieveEffectiveConfigRequest; - - /** - * Decodes a RetrieveEffectiveConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RetrieveEffectiveConfigRequest - * @throws {Error} If the payload is 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.RetrieveEffectiveConfigRequest; - - /** - * Verifies a RetrieveEffectiveConfigRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RetrieveEffectiveConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RetrieveEffectiveConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest; - - /** - * Creates a plain object from a RetrieveEffectiveConfigRequest message. Also converts values to other types if specified. - * @param message RetrieveEffectiveConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RetrieveEffectiveConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RetrieveEffectiveConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** TagTemplateMigration enum. */ - enum TagTemplateMigration { - TAG_TEMPLATE_MIGRATION_UNSPECIFIED = 0, - TAG_TEMPLATE_MIGRATION_ENABLED = 1, - TAG_TEMPLATE_MIGRATION_DISABLED = 2 - } - - /** CatalogUIExperience enum. */ - enum CatalogUIExperience { - CATALOG_UI_EXPERIENCE_UNSPECIFIED = 0, - CATALOG_UI_EXPERIENCE_ENABLED = 1, - CATALOG_UI_EXPERIENCE_DISABLED = 2 - } - - /** Properties of an OrganizationConfig. */ - interface IOrganizationConfig { - - /** OrganizationConfig config */ - config?: ({ [k: string]: google.cloud.datacatalog.v1.IMigrationConfig }|null); - } - - /** Represents an OrganizationConfig. */ - class OrganizationConfig implements IOrganizationConfig { - - /** - * Constructs a new OrganizationConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IOrganizationConfig); - - /** OrganizationConfig config. */ - public config: { [k: string]: google.cloud.datacatalog.v1.IMigrationConfig }; - - /** - * Creates a new OrganizationConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns OrganizationConfig instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IOrganizationConfig): google.cloud.datacatalog.v1.OrganizationConfig; - - /** - * Encodes the specified OrganizationConfig message. Does not implicitly {@link google.cloud.datacatalog.v1.OrganizationConfig.verify|verify} messages. - * @param message OrganizationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IOrganizationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OrganizationConfig message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.OrganizationConfig.verify|verify} messages. - * @param message OrganizationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IOrganizationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OrganizationConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OrganizationConfig - * @throws {Error} If the payload is not a 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.OrganizationConfig; - - /** - * Decodes an OrganizationConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OrganizationConfig - * @throws {Error} If the payload is 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.OrganizationConfig; - - /** - * Verifies an OrganizationConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OrganizationConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OrganizationConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.OrganizationConfig; - - /** - * Creates a plain object from an OrganizationConfig message. Also converts values to other types if specified. - * @param message OrganizationConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.OrganizationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OrganizationConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OrganizationConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MigrationConfig. */ - interface IMigrationConfig { - - /** MigrationConfig tagTemplateMigration */ - tagTemplateMigration?: (google.cloud.datacatalog.v1.TagTemplateMigration|keyof typeof google.cloud.datacatalog.v1.TagTemplateMigration|null); - - /** MigrationConfig catalogUiExperience */ - catalogUiExperience?: (google.cloud.datacatalog.v1.CatalogUIExperience|keyof typeof google.cloud.datacatalog.v1.CatalogUIExperience|null); - } - - /** Represents a MigrationConfig. */ - class MigrationConfig implements IMigrationConfig { - - /** - * Constructs a new MigrationConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IMigrationConfig); - - /** MigrationConfig tagTemplateMigration. */ - public tagTemplateMigration: (google.cloud.datacatalog.v1.TagTemplateMigration|keyof typeof google.cloud.datacatalog.v1.TagTemplateMigration); - - /** MigrationConfig catalogUiExperience. */ - public catalogUiExperience: (google.cloud.datacatalog.v1.CatalogUIExperience|keyof typeof google.cloud.datacatalog.v1.CatalogUIExperience); - - /** - * Creates a new MigrationConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns MigrationConfig instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IMigrationConfig): google.cloud.datacatalog.v1.MigrationConfig; - - /** - * Encodes the specified MigrationConfig message. Does not implicitly {@link google.cloud.datacatalog.v1.MigrationConfig.verify|verify} messages. - * @param message MigrationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IMigrationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MigrationConfig message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.MigrationConfig.verify|verify} messages. - * @param message MigrationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IMigrationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MigrationConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MigrationConfig - * @throws {Error} If the payload is not a 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.MigrationConfig; - - /** - * Decodes a MigrationConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MigrationConfig - * @throws {Error} If the payload is 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.MigrationConfig; - - /** - * Verifies a MigrationConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MigrationConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MigrationConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.MigrationConfig; - - /** - * Creates a plain object from a MigrationConfig message. Also converts values to other types if specified. - * @param message MigrationConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.MigrationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MigrationConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MigrationConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** 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 defaultValue */ - defaultValue?: (string|null); - - /** ColumnSchema ordinalPosition */ - ordinalPosition?: (number|null); - - /** ColumnSchema highestIndexingType */ - highestIndexingType?: (google.cloud.datacatalog.v1.ColumnSchema.IndexingType|keyof typeof google.cloud.datacatalog.v1.ColumnSchema.IndexingType|null); - - /** ColumnSchema subcolumns */ - subcolumns?: (google.cloud.datacatalog.v1.IColumnSchema[]|null); - - /** ColumnSchema lookerColumnSpec */ - lookerColumnSpec?: (google.cloud.datacatalog.v1.ColumnSchema.ILookerColumnSpec|null); - - /** ColumnSchema rangeElementType */ - rangeElementType?: (google.cloud.datacatalog.v1.ColumnSchema.IFieldElementType|null); - - /** ColumnSchema gcRule */ - gcRule?: (string|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 defaultValue. */ - public defaultValue: string; - - /** ColumnSchema ordinalPosition. */ - public ordinalPosition: number; - - /** ColumnSchema highestIndexingType. */ - public highestIndexingType: (google.cloud.datacatalog.v1.ColumnSchema.IndexingType|keyof typeof google.cloud.datacatalog.v1.ColumnSchema.IndexingType); - - /** ColumnSchema subcolumns. */ - public subcolumns: google.cloud.datacatalog.v1.IColumnSchema[]; - - /** ColumnSchema lookerColumnSpec. */ - public lookerColumnSpec?: (google.cloud.datacatalog.v1.ColumnSchema.ILookerColumnSpec|null); - - /** ColumnSchema rangeElementType. */ - public rangeElementType?: (google.cloud.datacatalog.v1.ColumnSchema.IFieldElementType|null); - - /** ColumnSchema gcRule. */ - public gcRule: string; - - /** ColumnSchema systemSpec. */ - public systemSpec?: "lookerColumnSpec"; - - /** - * 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; - } - - namespace ColumnSchema { - - /** IndexingType enum. */ - enum IndexingType { - INDEXING_TYPE_UNSPECIFIED = 0, - INDEXING_TYPE_NONE = 1, - INDEXING_TYPE_NON_UNIQUE = 2, - INDEXING_TYPE_UNIQUE = 3, - INDEXING_TYPE_PRIMARY_KEY = 4 - } - - /** Properties of a LookerColumnSpec. */ - interface ILookerColumnSpec { - - /** LookerColumnSpec type */ - type?: (google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType|keyof typeof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType|null); - } - - /** Represents a LookerColumnSpec. */ - class LookerColumnSpec implements ILookerColumnSpec { - - /** - * Constructs a new LookerColumnSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ColumnSchema.ILookerColumnSpec); - - /** LookerColumnSpec type. */ - public type: (google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType|keyof typeof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType); - - /** - * Creates a new LookerColumnSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns LookerColumnSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ColumnSchema.ILookerColumnSpec): google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec; - - /** - * Encodes the specified LookerColumnSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.verify|verify} messages. - * @param message LookerColumnSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ColumnSchema.ILookerColumnSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LookerColumnSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.verify|verify} messages. - * @param message LookerColumnSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ColumnSchema.ILookerColumnSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LookerColumnSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LookerColumnSpec - * @throws {Error} If the payload is not a 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.LookerColumnSpec; - - /** - * Decodes a LookerColumnSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LookerColumnSpec - * @throws {Error} If the payload is 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.LookerColumnSpec; - - /** - * Verifies a LookerColumnSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LookerColumnSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LookerColumnSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec; - - /** - * Creates a plain object from a LookerColumnSpec message. Also converts values to other types if specified. - * @param message LookerColumnSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LookerColumnSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LookerColumnSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace LookerColumnSpec { - - /** LookerColumnType enum. */ - enum LookerColumnType { - LOOKER_COLUMN_TYPE_UNSPECIFIED = 0, - DIMENSION = 1, - DIMENSION_GROUP = 2, - FILTER = 3, - MEASURE = 4, - PARAMETER = 5 - } - } - - /** Properties of a FieldElementType. */ - interface IFieldElementType { - - /** FieldElementType type */ - type?: (string|null); - } - - /** Represents a FieldElementType. */ - class FieldElementType implements IFieldElementType { - - /** - * Constructs a new FieldElementType. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ColumnSchema.IFieldElementType); - - /** FieldElementType type. */ - public type: string; - - /** - * Creates a new FieldElementType instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldElementType instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ColumnSchema.IFieldElementType): google.cloud.datacatalog.v1.ColumnSchema.FieldElementType; - - /** - * Encodes the specified FieldElementType message. Does not implicitly {@link google.cloud.datacatalog.v1.ColumnSchema.FieldElementType.verify|verify} messages. - * @param message FieldElementType message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ColumnSchema.IFieldElementType, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldElementType message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ColumnSchema.FieldElementType.verify|verify} messages. - * @param message FieldElementType message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ColumnSchema.IFieldElementType, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldElementType message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldElementType - * @throws {Error} If the payload is not a 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.FieldElementType; - - /** - * Decodes a FieldElementType message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldElementType - * @throws {Error} If the payload is 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.FieldElementType; - - /** - * Verifies a FieldElementType message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldElementType message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldElementType - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ColumnSchema.FieldElementType; - - /** - * Creates a plain object from a FieldElementType message. Also converts values to other types if specified. - * @param message FieldElementType - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ColumnSchema.FieldElementType, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldElementType to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldElementType - * @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); - - /** Tag dataplexTransferStatus */ - dataplexTransferStatus?: (google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus|keyof typeof google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus|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 dataplexTransferStatus. */ - public dataplexTransferStatus: (google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus|keyof typeof google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus); - - /** 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); - - /** TagTemplate dataplexTransferStatus */ - dataplexTransferStatus?: (google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus|keyof typeof google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus|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 }; - - /** TagTemplate dataplexTransferStatus. */ - public dataplexTransferStatus: (google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus|keyof typeof google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus); - - /** - * 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; - } - - namespace TagTemplate { - - /** DataplexTransferStatus enum. */ - enum DataplexTransferStatus { - DATAPLEX_TRANSFER_STATUS_UNSPECIFIED = 0, - MIGRATED = 1, - TRANSFERRED = 2 - } - } - - /** 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 CommonUsageStats. */ - interface ICommonUsageStats { - - /** CommonUsageStats viewCount */ - viewCount?: (number|Long|string|null); - } - - /** Represents a CommonUsageStats. */ - class CommonUsageStats implements ICommonUsageStats { - - /** - * Constructs a new CommonUsageStats. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ICommonUsageStats); - - /** CommonUsageStats viewCount. */ - public viewCount?: (number|Long|string|null); - - /** CommonUsageStats _viewCount. */ - public _viewCount?: "viewCount"; - - /** - * Creates a new CommonUsageStats instance using the specified properties. - * @param [properties] Properties to set - * @returns CommonUsageStats instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ICommonUsageStats): google.cloud.datacatalog.v1.CommonUsageStats; - - /** - * Encodes the specified CommonUsageStats message. Does not implicitly {@link google.cloud.datacatalog.v1.CommonUsageStats.verify|verify} messages. - * @param message CommonUsageStats message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ICommonUsageStats, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommonUsageStats message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CommonUsageStats.verify|verify} messages. - * @param message CommonUsageStats message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ICommonUsageStats, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommonUsageStats message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommonUsageStats - * @throws {Error} If the payload is not a 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.CommonUsageStats; - - /** - * Decodes a CommonUsageStats message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommonUsageStats - * @throws {Error} If the payload is 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.CommonUsageStats; - - /** - * Verifies a CommonUsageStats message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CommonUsageStats message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommonUsageStats - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.CommonUsageStats; - - /** - * Creates a plain object from a CommonUsageStats message. Also converts values to other types if specified. - * @param message CommonUsageStats - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.CommonUsageStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommonUsageStats to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CommonUsageStats - * @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); - - /** UsageSignal commonUsageWithinTimeRange */ - commonUsageWithinTimeRange?: ({ [k: string]: google.cloud.datacatalog.v1.ICommonUsageStats }|null); - - /** UsageSignal favoriteCount */ - favoriteCount?: (number|Long|string|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 }; - - /** UsageSignal commonUsageWithinTimeRange. */ - public commonUsageWithinTimeRange: { [k: string]: google.cloud.datacatalog.v1.ICommonUsageStats }; - - /** UsageSignal favoriteCount. */ - public favoriteCount?: (number|Long|string|null); - - /** UsageSignal _favoriteCount. */ - public _favoriteCount?: "favoriteCount"; - - /** - * 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; - } - - /** Properties of a TaggedEntry. */ - interface ITaggedEntry { - - /** TaggedEntry v1Entry */ - v1Entry?: (google.cloud.datacatalog.v1.IEntry|null); - - /** TaggedEntry presentTags */ - presentTags?: (google.cloud.datacatalog.v1.ITag[]|null); - - /** TaggedEntry absentTags */ - absentTags?: (google.cloud.datacatalog.v1.ITag[]|null); - } - - /** Represents a TaggedEntry. */ - class TaggedEntry implements ITaggedEntry { - - /** - * Constructs a new TaggedEntry. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ITaggedEntry); - - /** TaggedEntry v1Entry. */ - public v1Entry?: (google.cloud.datacatalog.v1.IEntry|null); - - /** TaggedEntry presentTags. */ - public presentTags: google.cloud.datacatalog.v1.ITag[]; - - /** TaggedEntry absentTags. */ - public absentTags: google.cloud.datacatalog.v1.ITag[]; - - /** TaggedEntry entry. */ - public entry?: "v1Entry"; - - /** - * Creates a new TaggedEntry instance using the specified properties. - * @param [properties] Properties to set - * @returns TaggedEntry instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ITaggedEntry): google.cloud.datacatalog.v1.TaggedEntry; - - /** - * Encodes the specified TaggedEntry message. Does not implicitly {@link google.cloud.datacatalog.v1.TaggedEntry.verify|verify} messages. - * @param message TaggedEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ITaggedEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TaggedEntry message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.TaggedEntry.verify|verify} messages. - * @param message TaggedEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ITaggedEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TaggedEntry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TaggedEntry - * @throws {Error} If the payload is not a 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.TaggedEntry; - - /** - * Decodes a TaggedEntry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TaggedEntry - * @throws {Error} If the payload is 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.TaggedEntry; - - /** - * Verifies a TaggedEntry message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TaggedEntry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TaggedEntry - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.TaggedEntry; - - /** - * Creates a plain object from a TaggedEntry message. Also converts values to other types if specified. - * @param message TaggedEntry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.TaggedEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TaggedEntry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TaggedEntry - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DumpItem. */ - interface IDumpItem { - - /** DumpItem taggedEntry */ - taggedEntry?: (google.cloud.datacatalog.v1.ITaggedEntry|null); - } - - /** Represents a DumpItem. */ - class DumpItem implements IDumpItem { - - /** - * Constructs a new DumpItem. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IDumpItem); - - /** DumpItem taggedEntry. */ - public taggedEntry?: (google.cloud.datacatalog.v1.ITaggedEntry|null); - - /** DumpItem item. */ - public item?: "taggedEntry"; - - /** - * Creates a new DumpItem instance using the specified properties. - * @param [properties] Properties to set - * @returns DumpItem instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IDumpItem): google.cloud.datacatalog.v1.DumpItem; - - /** - * Encodes the specified DumpItem message. Does not implicitly {@link google.cloud.datacatalog.v1.DumpItem.verify|verify} messages. - * @param message DumpItem message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IDumpItem, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DumpItem message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DumpItem.verify|verify} messages. - * @param message DumpItem message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IDumpItem, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DumpItem message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DumpItem - * @throws {Error} If the payload is not a 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.DumpItem; - - /** - * Decodes a DumpItem message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DumpItem - * @throws {Error} If the payload is 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.DumpItem; - - /** - * Verifies a DumpItem message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DumpItem message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DumpItem - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.DumpItem; - - /** - * Creates a plain object from a DumpItem message. Also converts values to other types if specified. - * @param message DumpItem - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.DumpItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DumpItem to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DumpItem - * @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); - - /** Taxonomy service */ - service?: (google.cloud.datacatalog.v1.Taxonomy.IService|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[]; - - /** Taxonomy service. */ - public service?: (google.cloud.datacatalog.v1.Taxonomy.IService|null); - - /** - * 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 Service. */ - interface IService { - - /** Service name */ - name?: (google.cloud.datacatalog.v1.ManagingSystem|keyof typeof google.cloud.datacatalog.v1.ManagingSystem|null); - - /** Service identity */ - identity?: (string|null); - } - - /** Represents a Service. */ - class Service implements IService { - - /** - * Constructs a new Service. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.Taxonomy.IService); - - /** Service name. */ - public name: (google.cloud.datacatalog.v1.ManagingSystem|keyof typeof google.cloud.datacatalog.v1.ManagingSystem); - - /** Service identity. */ - public identity: string; - - /** - * Creates a new Service instance using the specified properties. - * @param [properties] Properties to set - * @returns Service instance - */ - public static create(properties?: google.cloud.datacatalog.v1.Taxonomy.IService): google.cloud.datacatalog.v1.Taxonomy.Service; - - /** - * Encodes the specified Service message. Does not implicitly {@link google.cloud.datacatalog.v1.Taxonomy.Service.verify|verify} messages. - * @param message Service message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.Taxonomy.IService, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Service message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.Taxonomy.Service.verify|verify} messages. - * @param message Service message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.Taxonomy.IService, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Service message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Service - * @throws {Error} If the payload is not a 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.Service; - - /** - * Decodes a Service message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Service - * @throws {Error} If the payload is 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.Service; - - /** - * Verifies a Service message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Service message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Service - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.Taxonomy.Service; - - /** - * Creates a plain object from a Service message. Also converts values to other types if specified. - * @param message Service - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.Taxonomy.Service, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Service to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Service - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** 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); - - /** ListTaxonomiesRequest filter */ - filter?: (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; - - /** ListTaxonomiesRequest filter. */ - public filter: 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 api. */ - namespace api { - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7, - IDENTIFIER = 8 - } - - /** Properties of a Http. */ - interface IHttp { - - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); - - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); - } - - /** Represents a Http. */ - class Http implements IHttp { - - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); - - /** Http rules. */ - public rules: google.api.IHttpRule[]; - - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; - - /** - * Creates a new Http instance using the specified properties. - * @param [properties] Properties to set - * @returns Http instance - */ - public static create(properties?: google.api.IHttp): google.api.Http; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Http message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; - - /** - * Verifies a Http message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Http - */ - public static fromObject(object: { [k: string]: any }): google.api.Http; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Http - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); - - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body */ - body?: (string|null); - - /** HttpRule responseBody */ - responseBody?: (string|null); - - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); - } - - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { - - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get?: (string|null); - - /** HttpRule put. */ - public put?: (string|null); - - /** HttpRule post. */ - public post?: (string|null); - - /** HttpRule delete. */ - public delete?: (string|null); - - /** HttpRule patch. */ - public patch?: (string|null); - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; - - /** HttpRule responseBody. */ - public responseBody: string; - - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; - - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - - /** - * Creates a new HttpRule instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpRule instance - */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; - - /** - * Verifies a HttpRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRule - */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HttpRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { - - /** CustomHttpPattern kind */ - kind?: (string|null); - - /** CustomHttpPattern path */ - path?: (string|null); - } - - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { - - /** - * Constructs a new CustomHttpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICustomHttpPattern); - - /** CustomHttpPattern kind. */ - public kind: string; - - /** CustomHttpPattern path. */ - public path: string; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomHttpPattern instance - */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; - - /** - * Verifies a CustomHttpPattern message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomHttpPattern - */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomHttpPattern to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomHttpPattern - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CommonLanguageSettings. */ - interface ICommonLanguageSettings { - - /** CommonLanguageSettings referenceDocsUri */ - referenceDocsUri?: (string|null); - - /** CommonLanguageSettings destinations */ - destinations?: (google.api.ClientLibraryDestination[]|null); - } - - /** Represents a CommonLanguageSettings. */ - class CommonLanguageSettings implements ICommonLanguageSettings { - - /** - * Constructs a new CommonLanguageSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICommonLanguageSettings); - - /** CommonLanguageSettings referenceDocsUri. */ - public referenceDocsUri: string; - - /** CommonLanguageSettings destinations. */ - public destinations: google.api.ClientLibraryDestination[]; - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CommonLanguageSettings instance - */ - public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; - - /** - * Verifies a CommonLanguageSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommonLanguageSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @param message CommonLanguageSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CommonLanguageSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ClientLibrarySettings. */ - interface IClientLibrarySettings { - - /** ClientLibrarySettings version */ - version?: (string|null); - - /** ClientLibrarySettings launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - - /** ClientLibrarySettings restNumericEnums */ - restNumericEnums?: (boolean|null); - - /** ClientLibrarySettings javaSettings */ - javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings */ - cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings */ - phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings */ - pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings */ - nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings */ - dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings */ - rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings */ - goSettings?: (google.api.IGoSettings|null); - } - - /** Represents a ClientLibrarySettings. */ - class ClientLibrarySettings implements IClientLibrarySettings { - - /** - * Constructs a new ClientLibrarySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IClientLibrarySettings); - - /** ClientLibrarySettings version. */ - public version: string; - - /** ClientLibrarySettings launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - - /** ClientLibrarySettings restNumericEnums. */ - public restNumericEnums: boolean; - - /** ClientLibrarySettings javaSettings. */ - public javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings. */ - public cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings. */ - public phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings. */ - public pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings. */ - public nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings. */ - public dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings. */ - public rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings. */ - public goSettings?: (google.api.IGoSettings|null); - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns ClientLibrarySettings instance - */ - public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; - - /** - * Verifies a ClientLibrarySettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientLibrarySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @param message ClientLibrarySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClientLibrarySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Publishing. */ - interface IPublishing { - - /** Publishing methodSettings */ - methodSettings?: (google.api.IMethodSettings[]|null); - - /** Publishing newIssueUri */ - newIssueUri?: (string|null); - - /** Publishing documentationUri */ - documentationUri?: (string|null); - - /** Publishing apiShortName */ - apiShortName?: (string|null); - - /** Publishing githubLabel */ - githubLabel?: (string|null); - - /** Publishing codeownerGithubTeams */ - codeownerGithubTeams?: (string[]|null); - - /** Publishing docTagPrefix */ - docTagPrefix?: (string|null); - - /** Publishing organization */ - organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); - - /** Publishing librarySettings */ - librarySettings?: (google.api.IClientLibrarySettings[]|null); - - /** Publishing protoReferenceDocumentationUri */ - protoReferenceDocumentationUri?: (string|null); - - /** Publishing restReferenceDocumentationUri */ - restReferenceDocumentationUri?: (string|null); - } - - /** Represents a Publishing. */ - class Publishing implements IPublishing { - - /** - * Constructs a new Publishing. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPublishing); - - /** Publishing methodSettings. */ - public methodSettings: google.api.IMethodSettings[]; - - /** Publishing newIssueUri. */ - public newIssueUri: string; - - /** Publishing documentationUri. */ - public documentationUri: string; - - /** Publishing apiShortName. */ - public apiShortName: string; - - /** Publishing githubLabel. */ - public githubLabel: string; - - /** Publishing codeownerGithubTeams. */ - public codeownerGithubTeams: string[]; - - /** Publishing docTagPrefix. */ - public docTagPrefix: string; - - /** Publishing organization. */ - public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); - - /** Publishing librarySettings. */ - public librarySettings: google.api.IClientLibrarySettings[]; - - /** Publishing protoReferenceDocumentationUri. */ - public protoReferenceDocumentationUri: string; - - /** Publishing restReferenceDocumentationUri. */ - public restReferenceDocumentationUri: string; - - /** - * Creates a new Publishing instance using the specified properties. - * @param [properties] Properties to set - * @returns Publishing instance - */ - public static create(properties?: google.api.IPublishing): google.api.Publishing; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; - - /** - * Verifies a Publishing message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Publishing - */ - public static fromObject(object: { [k: string]: any }): google.api.Publishing; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @param message Publishing - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Publishing to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Publishing - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a JavaSettings. */ - interface IJavaSettings { - - /** JavaSettings libraryPackage */ - libraryPackage?: (string|null); - - /** JavaSettings serviceClassNames */ - serviceClassNames?: ({ [k: string]: string }|null); - - /** JavaSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a JavaSettings. */ - class JavaSettings implements IJavaSettings { - - /** - * Constructs a new JavaSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IJavaSettings); - - /** JavaSettings libraryPackage. */ - public libraryPackage: string; - - /** JavaSettings serviceClassNames. */ - public serviceClassNames: { [k: string]: string }; - - /** JavaSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new JavaSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns JavaSettings instance - */ - public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; - - /** - * Verifies a JavaSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JavaSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @param message JavaSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JavaSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for JavaSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CppSettings. */ - interface ICppSettings { - - /** CppSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a CppSettings. */ - class CppSettings implements ICppSettings { - - /** - * Constructs a new CppSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICppSettings); - - /** CppSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new CppSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CppSettings instance - */ - public static create(properties?: google.api.ICppSettings): google.api.CppSettings; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; - - /** - * Verifies a CppSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CppSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CppSettings; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @param message CppSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CppSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CppSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PhpSettings. */ - interface IPhpSettings { - - /** PhpSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PhpSettings. */ - class PhpSettings implements IPhpSettings { - - /** - * Constructs a new PhpSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPhpSettings); - - /** PhpSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PhpSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PhpSettings instance - */ - public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; - - /** - * Verifies a PhpSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PhpSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @param message PhpSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PhpSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PhpSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PythonSettings. */ - interface IPythonSettings { - - /** PythonSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PythonSettings. */ - class PythonSettings implements IPythonSettings { - - /** - * Constructs a new PythonSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPythonSettings); - - /** PythonSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PythonSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PythonSettings instance - */ - public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; - - /** - * Verifies a PythonSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PythonSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @param message PythonSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PythonSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PythonSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodeSettings. */ - interface INodeSettings { - - /** NodeSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a NodeSettings. */ - class NodeSettings implements INodeSettings { - - /** - * Constructs a new NodeSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.INodeSettings); - - /** NodeSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new NodeSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeSettings instance - */ - public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; - - /** - * Verifies a NodeSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @param message NodeSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DotnetSettings. */ - interface IDotnetSettings { - - /** DotnetSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices */ - renamedServices?: ({ [k: string]: string }|null); - - /** DotnetSettings renamedResources */ - renamedResources?: ({ [k: string]: string }|null); - - /** DotnetSettings ignoredResources */ - ignoredResources?: (string[]|null); - - /** DotnetSettings forcedNamespaceAliases */ - forcedNamespaceAliases?: (string[]|null); - - /** DotnetSettings handwrittenSignatures */ - handwrittenSignatures?: (string[]|null); - } - - /** Represents a DotnetSettings. */ - class DotnetSettings implements IDotnetSettings { - - /** - * Constructs a new DotnetSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IDotnetSettings); - - /** DotnetSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices. */ - public renamedServices: { [k: string]: string }; - - /** DotnetSettings renamedResources. */ - public renamedResources: { [k: string]: string }; - - /** DotnetSettings ignoredResources. */ - public ignoredResources: string[]; - - /** DotnetSettings forcedNamespaceAliases. */ - public forcedNamespaceAliases: string[]; - - /** DotnetSettings handwrittenSignatures. */ - public handwrittenSignatures: string[]; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns DotnetSettings instance - */ - public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; - - /** - * Verifies a DotnetSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DotnetSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @param message DotnetSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DotnetSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DotnetSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RubySettings. */ - interface IRubySettings { - - /** RubySettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a RubySettings. */ - class RubySettings implements IRubySettings { - - /** - * Constructs a new RubySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IRubySettings); - - /** RubySettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new RubySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns RubySettings instance - */ - public static create(properties?: google.api.IRubySettings): google.api.RubySettings; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; - - /** - * Verifies a RubySettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RubySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.RubySettings; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @param message RubySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RubySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RubySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GoSettings. */ - interface IGoSettings { - - /** GoSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a GoSettings. */ - class GoSettings implements IGoSettings { - - /** - * Constructs a new GoSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IGoSettings); - - /** GoSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new GoSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns GoSettings instance - */ - public static create(properties?: google.api.IGoSettings): google.api.GoSettings; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; - - /** - * Verifies a GoSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GoSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.GoSettings; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @param message GoSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GoSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GoSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodSettings. */ - interface IMethodSettings { - - /** MethodSettings selector */ - selector?: (string|null); - - /** MethodSettings longRunning */ - longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields */ - autoPopulatedFields?: (string[]|null); - } - - /** Represents a MethodSettings. */ - class MethodSettings implements IMethodSettings { - - /** - * Constructs a new MethodSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IMethodSettings); - - /** MethodSettings selector. */ - public selector: string; - - /** MethodSettings longRunning. */ - public longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields. */ - public autoPopulatedFields: string[]; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodSettings instance - */ - public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; - - /** - * Verifies a MethodSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @param message MethodSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodSettings { - - /** Properties of a LongRunning. */ - interface ILongRunning { - - /** LongRunning initialPollDelay */ - initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier */ - pollDelayMultiplier?: (number|null); - - /** LongRunning maxPollDelay */ - maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout */ - totalPollTimeout?: (google.protobuf.IDuration|null); - } - - /** Represents a LongRunning. */ - class LongRunning implements ILongRunning { - - /** - * Constructs a new LongRunning. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.MethodSettings.ILongRunning); - - /** LongRunning initialPollDelay. */ - public initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier. */ - public pollDelayMultiplier: number; - - /** LongRunning maxPollDelay. */ - public maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout. */ - public totalPollTimeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new LongRunning instance using the specified properties. - * @param [properties] Properties to set - * @returns LongRunning instance - */ - public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; - - /** - * Verifies a LongRunning message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LongRunning - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @param message LongRunning - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LongRunning to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LongRunning - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** ClientLibraryOrganization enum. */ - enum ClientLibraryOrganization { - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, - CLOUD = 1, - ADS = 2, - PHOTOS = 3, - STREET_VIEW = 4, - SHOPPING = 5, - GEO = 6, - GENERATIVE_AI = 7 - } - - /** ClientLibraryDestination enum. */ - enum ClientLibraryDestination { - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, - GITHUB = 10, - PACKAGE_MANAGER = 20 - } - - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - UNIMPLEMENTED = 6, - PRELAUNCH = 7, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - - /** ResourceDescriptor plural */ - plural?: (string|null); - - /** ResourceDescriptor singular */ - singular?: (string|null); - - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); - } - - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { - - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; - - /** ResourceDescriptor singular. */ - public singular: string; - - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; - - /** - * Verifies a ResourceDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceDescriptor - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); - - /** ResourceReference childType */ - childType?: (string|null); - } - - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { - - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); - - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; - - /** - * Verifies a ResourceReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceReference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { - - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } - - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { - - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); - - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorSet instance - */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; - - /** - * Verifies a FileDescriptorSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Edition enum. */ - enum Edition { - EDITION_UNKNOWN = 0, - EDITION_PROTO2 = 998, - EDITION_PROTO3 = 999, - EDITION_2023 = 1000, - EDITION_2024 = 1001, - EDITION_1_TEST_ONLY = 1, - EDITION_2_TEST_ONLY = 2, - EDITION_99997_TEST_ONLY = 99997, - EDITION_99998_TEST_ONLY = 99998, - EDITION_99999_TEST_ONLY = 99999, - EDITION_MAX = 2147483647 - } - - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { - - /** FileDescriptorProto name */ - name?: (string|null); - - /** FileDescriptorProto package */ - "package"?: (string|null); - - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); - - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); - - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); - - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); - - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax */ - syntax?: (string|null); - - /** FileDescriptorProto edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { - - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** FileDescriptorProto name. */ - public name: string; - - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; - - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; - - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax. */ - public syntax: string; - - /** FileDescriptorProto edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; - - /** - * Verifies a FileDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { - - /** DescriptorProto name */ - name?: (string|null); - - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { - - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; - - /** - * Verifies a DescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DescriptorProto { - - /** Properties of an ExtensionRange. */ - interface IExtensionRange { - - /** ExtensionRange start */ - start?: (number|null); - - /** ExtensionRange end */ - end?: (number|null); - - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } - - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { - - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; - - /** ExtensionRange end. */ - public end: number; - - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Verifies an ExtensionRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReservedRange. */ - interface IReservedRange { - - /** ReservedRange start */ - start?: (number|null); - - /** ReservedRange end */ - end?: (number|null); - } - - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { - - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - - /** ReservedRange start. */ - public start: number; - - /** ReservedRange end. */ - public end: number; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Verifies a ReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { - - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ExtensionRangeOptions declaration */ - declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); - - /** ExtensionRangeOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification */ - verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); - } - - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { - - /** - * Constructs a new ExtensionRangeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); - - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** ExtensionRangeOptions declaration. */ - public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; - - /** ExtensionRangeOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification. */ - public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance - */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; - - /** - * Verifies an ExtensionRangeOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRangeOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ExtensionRangeOptions { - - /** Properties of a Declaration. */ - interface IDeclaration { - - /** Declaration number */ - number?: (number|null); - - /** Declaration fullName */ - fullName?: (string|null); - - /** Declaration type */ - type?: (string|null); - - /** Declaration reserved */ - reserved?: (boolean|null); - - /** Declaration repeated */ - repeated?: (boolean|null); - } - - /** Represents a Declaration. */ - class Declaration implements IDeclaration { - - /** - * Constructs a new Declaration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); - - /** Declaration number. */ - public number: number; - - /** Declaration fullName. */ - public fullName: string; - - /** Declaration type. */ - public type: string; - - /** Declaration reserved. */ - public reserved: boolean; - - /** Declaration repeated. */ - public repeated: boolean; - - /** - * Creates a new Declaration instance using the specified properties. - * @param [properties] Properties to set - * @returns Declaration instance - */ - public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Verifies a Declaration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Declaration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @param message Declaration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Declaration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Declaration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** VerificationState enum. */ - enum VerificationState { - DECLARATION = 0, - UNVERIFIED = 1 - } - } - - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - - /** FieldDescriptorProto name */ - name?: (string|null); - - /** FieldDescriptorProto number */ - number?: (number|null); - - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - - /** FieldDescriptorProto typeName */ - typeName?: (string|null); - - /** FieldDescriptorProto extendee */ - extendee?: (string|null); - - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); - - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); - - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); - - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); - } - - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { - - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); - - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; - - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - - /** FieldDescriptorProto typeName. */ - public typeName: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; - - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; - - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; - - /** FieldDescriptorProto jsonName. */ - public jsonName: string; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; - - /** - * Verifies a FieldDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldDescriptorProto { - - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 - } - - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REPEATED = 3, - LABEL_REQUIRED = 2 - } - } - - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); - - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } - - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { - - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; - - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofDescriptorProto instance - */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - - /** - * Verifies an OneofDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - - /** EnumDescriptorProto name */ - name?: (string|null); - - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { - - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; - - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - - /** - * Verifies an EnumDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EnumDescriptorProto { - - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { - - /** EnumReservedRange start */ - start?: (number|null); - - /** EnumReservedRange end */ - end?: (number|null); - } - - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { - - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - - /** EnumReservedRange start. */ - public start: number; - - /** EnumReservedRange end. */ - public end: number; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Verifies an EnumReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); - - /** EnumValueDescriptorProto number */ - number?: (number|null); - - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } - - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; - - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - - /** - * Verifies an EnumValueDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - - /** ServiceDescriptorProto name */ - name?: (string|null); - - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); - - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } - - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { - - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; - - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - - /** - * Verifies a ServiceDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { - - /** MethodDescriptorProto name */ - name?: (string|null); - - /** MethodDescriptorProto inputType */ - inputType?: (string|null); - - /** MethodDescriptorProto outputType */ - outputType?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); - - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } - - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { - - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); - - /** MethodDescriptorProto name. */ - public name: string; - - /** MethodDescriptorProto inputType. */ - public inputType: string; - - /** MethodDescriptorProto outputType. */ - public outputType: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; - - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; - - /** - * Verifies a MethodDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FileOptions. */ - interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); - - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions goPackage */ - goPackage?: (string|null); - - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); - - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); - - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); - - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); - - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); - - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); - - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); - - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); - - /** FileOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions javaPackage. */ - public javaPackage: string; - - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; - - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; - - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; - - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; - - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); - - /** FileOptions goPackage. */ - public goPackage: string; - - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; - - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; - - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; - - /** FileOptions deprecated. */ - public deprecated: boolean; - - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; - - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; - - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; - - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; - - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; - - /** FileOptions phpNamespace. */ - public phpNamespace: string; - - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; - - /** FileOptions rubyPackage. */ - public rubyPackage: string; - - /** FileOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FileOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FileOptions instance - */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; - - /** - * Verifies a FileOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FileOptions { - - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } - - /** Properties of a MessageOptions. */ - interface IMessageOptions { - - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); - - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); - - /** MessageOptions deprecated */ - deprecated?: (boolean|null); - - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); - - /** MessageOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** MessageOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; - - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions mapEntry. */ - public mapEntry: boolean; - - /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** MessageOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageOptions instance - */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; - - /** - * Verifies a MessageOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MessageOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldOptions. */ - interface IFieldOptions { - - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - - /** FieldOptions packed */ - packed?: (boolean|null); - - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - - /** FieldOptions lazy */ - lazy?: (boolean|null); - - /** FieldOptions unverifiedLazy */ - unverifiedLazy?: (boolean|null); - - /** FieldOptions deprecated */ - deprecated?: (boolean|null); - - /** FieldOptions weak */ - weak?: (boolean|null); - - /** FieldOptions debugRedact */ - debugRedact?: (boolean|null); - - /** FieldOptions retention */ - retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); - - /** FieldOptions targets */ - targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); - - /** FieldOptions editionDefaults */ - editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); - - /** FieldOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - } - - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { - - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); - - /** FieldOptions ctype. */ - public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); - - /** FieldOptions packed. */ - public packed: boolean; - - /** FieldOptions jstype. */ - public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); - - /** FieldOptions lazy. */ - public lazy: boolean; - - /** FieldOptions unverifiedLazy. */ - public unverifiedLazy: boolean; - - /** FieldOptions deprecated. */ - public deprecated: boolean; - - /** FieldOptions weak. */ - public weak: boolean; - - /** FieldOptions debugRedact. */ - public debugRedact: boolean; - - /** FieldOptions retention. */ - public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); - - /** FieldOptions targets. */ - public targets: google.protobuf.FieldOptions.OptionTargetType[]; - - /** FieldOptions editionDefaults. */ - public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; - - /** FieldOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldOptions instance - */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; - - /** - * Verifies a FieldOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldOptions { - - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } - - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 - } - - /** OptionRetention enum. */ - enum OptionRetention { - RETENTION_UNKNOWN = 0, - RETENTION_RUNTIME = 1, - RETENTION_SOURCE = 2 - } - - /** OptionTargetType enum. */ - enum OptionTargetType { - TARGET_TYPE_UNKNOWN = 0, - TARGET_TYPE_FILE = 1, - TARGET_TYPE_EXTENSION_RANGE = 2, - TARGET_TYPE_MESSAGE = 3, - TARGET_TYPE_FIELD = 4, - TARGET_TYPE_ONEOF = 5, - TARGET_TYPE_ENUM = 6, - TARGET_TYPE_ENUM_ENTRY = 7, - TARGET_TYPE_SERVICE = 8, - TARGET_TYPE_METHOD = 9 - } - - /** Properties of an EditionDefault. */ - interface IEditionDefault { - - /** EditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** EditionDefault value */ - value?: (string|null); - } - - /** Represents an EditionDefault. */ - class EditionDefault implements IEditionDefault { - - /** - * Constructs a new EditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); - - /** EditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** EditionDefault value. */ - public value: string; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns EditionDefault instance - */ - public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; - - /** - * Verifies an EditionDefault message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @param message EditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an OneofOptions. */ - interface IOneofOptions { - - /** OneofOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { - - /** - * Constructs a new OneofOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofOptions); - - /** OneofOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofOptions instance - */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; - - /** - * Verifies an OneofOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumOptions. */ - interface IEnumOptions { - - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); - - /** EnumOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** EnumOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { - - /** - * Constructs a new EnumOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumOptions); - - /** EnumOptions allowAlias. */ - public allowAlias: boolean; - - /** EnumOptions deprecated. */ - public deprecated: boolean; - - /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** EnumOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumOptions instance - */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; - - /** - * Verifies an EnumOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { - - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumValueOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact */ - debugRedact?: (boolean|null); - - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { - - /** - * Constructs a new EnumValueOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueOptions); - - /** EnumValueOptions deprecated. */ - public deprecated: boolean; - - /** EnumValueOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact. */ - public debugRedact: boolean; - - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueOptions instance - */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; - - /** - * Verifies an EnumValueOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceOptions. */ - interface IServiceOptions { - - /** ServiceOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); - - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ServiceOptions .google.api.defaultHost */ - ".google.api.defaultHost"?: (string|null); - - /** ServiceOptions .google.api.oauthScopes */ - ".google.api.oauthScopes"?: (string|null); - - /** ServiceOptions .google.api.apiVersion */ - ".google.api.apiVersion"?: (string|null); - } - - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { - - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); - - /** ServiceOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated. */ - public deprecated: boolean; - - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceOptions instance - */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; - - /** - * Verifies a ServiceOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodOptions. */ - interface IMethodOptions { - - /** MethodOptions deprecated */ - deprecated?: (boolean|null); - - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); - - /** MethodOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); - - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); - - /** MethodOptions .google.longrunning.operationInfo */ - ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); - } - - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { - - /** - * Constructs a new MethodOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodOptions); - - /** MethodOptions deprecated. */ - public deprecated: boolean; - - /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); - - /** MethodOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodOptions instance - */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; - - /** - * Verifies a MethodOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodOptions { - - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 - } - } - - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { - - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); - - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|string|null); - - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|string|null); - - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); - - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|string|null); - - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); - } - - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { - - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); - - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; - - /** UninterpretedOption identifierValue. */ - public identifierValue: string; - - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long|string); - - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long|string); - - /** UninterpretedOption doubleValue. */ - public doubleValue: number; - - /** UninterpretedOption stringValue. */ - public stringValue: (Uint8Array|string); - - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @param [properties] Properties to set - * @returns UninterpretedOption instance - */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; - - /** - * Verifies an UninterpretedOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UninterpretedOption - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UninterpretedOption - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UninterpretedOption { - - /** Properties of a NamePart. */ - interface INamePart { - - /** NamePart namePart */ - namePart: string; - - /** NamePart isExtension */ - isExtension: boolean; - } - - /** Represents a NamePart. */ - class NamePart implements INamePart { - - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - - /** NamePart namePart. */ - public namePart: string; - - /** NamePart isExtension. */ - public isExtension: boolean; - - /** - * Creates a new NamePart instance using the specified properties. - * @param [properties] Properties to set - * @returns NamePart instance - */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; - - /** - * Verifies a NamePart message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamePart - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a FeatureSet. */ - interface IFeatureSet { - - /** FeatureSet fieldPresence */ - fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); - - /** FeatureSet enumType */ - enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); - - /** FeatureSet repeatedFieldEncoding */ - repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); - - /** FeatureSet utf8Validation */ - utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); - - /** FeatureSet messageEncoding */ - messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); - - /** FeatureSet jsonFormat */ - jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); - } - - /** Represents a FeatureSet. */ - class FeatureSet implements IFeatureSet { - - /** - * Constructs a new FeatureSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSet); - - /** FeatureSet fieldPresence. */ - public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); - - /** FeatureSet enumType. */ - public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); - - /** FeatureSet repeatedFieldEncoding. */ - public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); - - /** FeatureSet utf8Validation. */ - public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); - - /** FeatureSet messageEncoding. */ - public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); - - /** FeatureSet jsonFormat. */ - public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); - - /** - * Creates a new FeatureSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSet instance - */ - public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; - - /** - * Verifies a FeatureSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @param message FeatureSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSet { - - /** FieldPresence enum. */ - enum FieldPresence { - FIELD_PRESENCE_UNKNOWN = 0, - EXPLICIT = 1, - IMPLICIT = 2, - LEGACY_REQUIRED = 3 - } - - /** EnumType enum. */ - enum EnumType { - ENUM_TYPE_UNKNOWN = 0, - OPEN = 1, - CLOSED = 2 - } - - /** RepeatedFieldEncoding enum. */ - enum RepeatedFieldEncoding { - REPEATED_FIELD_ENCODING_UNKNOWN = 0, - PACKED = 1, - EXPANDED = 2 - } - - /** Utf8Validation enum. */ - enum Utf8Validation { - UTF8_VALIDATION_UNKNOWN = 0, - VERIFY = 2, - NONE = 3 - } - - /** MessageEncoding enum. */ - enum MessageEncoding { - MESSAGE_ENCODING_UNKNOWN = 0, - LENGTH_PREFIXED = 1, - DELIMITED = 2 - } - - /** JsonFormat enum. */ - enum JsonFormat { - JSON_FORMAT_UNKNOWN = 0, - ALLOW = 1, - LEGACY_BEST_EFFORT = 2 - } - } - - /** Properties of a FeatureSetDefaults. */ - interface IFeatureSetDefaults { - - /** FeatureSetDefaults defaults */ - defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); - - /** FeatureSetDefaults minimumEdition */ - minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetDefaults maximumEdition */ - maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FeatureSetDefaults. */ - class FeatureSetDefaults implements IFeatureSetDefaults { - - /** - * Constructs a new FeatureSetDefaults. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSetDefaults); - - /** FeatureSetDefaults defaults. */ - public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; - - /** FeatureSetDefaults minimumEdition. */ - public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetDefaults maximumEdition. */ - public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetDefaults instance - */ - public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; - - /** - * Verifies a FeatureSetDefaults message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetDefaults - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @param message FeatureSetDefaults - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetDefaults - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSetDefaults { - - /** Properties of a FeatureSetEditionDefault. */ - interface IFeatureSetEditionDefault { - - /** FeatureSetEditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); - } - - /** Represents a FeatureSetEditionDefault. */ - class FeatureSetEditionDefault implements IFeatureSetEditionDefault { - - /** - * Constructs a new FeatureSetEditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); - - /** FeatureSetEditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetEditionDefault instance - */ - public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Verifies a FeatureSetEditionDefault message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetEditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @param message FeatureSetEditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { - - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); - } - - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { - - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); - - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceCodeInfo instance - */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; - - /** - * Verifies a SourceCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SourceCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SourceCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SourceCodeInfo { - - /** Properties of a Location. */ - interface ILocation { - - /** Location path */ - path?: (number[]|null); - - /** Location span */ - span?: (number[]|null); - - /** Location leadingComments */ - leadingComments?: (string|null); - - /** Location trailingComments */ - trailingComments?: (string|null); - - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); - } - - /** Represents a Location. */ - class Location implements ILocation { - - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - - /** Location path. */ - public path: number[]; - - /** Location span. */ - public span: number[]; - - /** Location leadingComments. */ - public leadingComments: string; - - /** Location trailingComments. */ - public trailingComments: string; - - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; - - /** - * Creates a new Location instance using the specified properties. - * @param [properties] Properties to set - * @returns Location instance - */ - public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Location message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; - - /** - * Verifies a Location message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Location - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Location - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { - - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); - } - - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { - - /** - * Constructs a new GeneratedCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); - - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance - */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; - - /** - * Verifies a GeneratedCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GeneratedCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GeneratedCodeInfo { - - /** Properties of an Annotation. */ - interface IAnnotation { - - /** Annotation path */ - path?: (number[]|null); - - /** Annotation sourceFile */ - sourceFile?: (string|null); - - /** Annotation begin */ - begin?: (number|null); - - /** Annotation end */ - end?: (number|null); - - /** Annotation semantic */ - semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); - } - - /** Represents an Annotation. */ - class Annotation implements IAnnotation { - - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - - /** Annotation path. */ - public path: number[]; - - /** Annotation sourceFile. */ - public sourceFile: string; - - /** Annotation begin. */ - public begin: number; - - /** Annotation end. */ - public end: number; - - /** Annotation semantic. */ - public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); - - /** - * Creates a new Annotation instance using the specified properties. - * @param [properties] Properties to set - * @returns Annotation instance - */ - public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Verifies an Annotation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Annotation - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Annotation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Annotation { - - /** Semantic enum. */ - enum Semantic { - NONE = 0, - SET = 1, - ALIAS = 2 - } - } - } - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|string|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long|string); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; - - /** - * Verifies a Timestamp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Timestamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|string|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long|string); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; - - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a 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 Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); - - /** Any value */ - value?: (Uint8Array|string|null); - } - - /** Represents an Any. */ - class Any implements IAny { - - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); - - /** Any type_url. */ - public type_url: string; - - /** Any value. */ - public value: (Uint8Array|string); - - /** - * Creates a new Any instance using the specified properties. - * @param [properties] Properties to set - * @returns Any instance - */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Any message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; - - /** - * Verifies an Any message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Any - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Any - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Empty. */ - interface IEmpty { - } - - /** Represents an Empty. */ - class Empty implements IEmpty { - - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); - - /** - * Creates a new Empty instance using the specified properties. - * @param [properties] Properties to set - * @returns Empty instance - */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; - - /** - * Verifies an Empty message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Empty - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Empty - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** 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; - } - } - - /** Namespace longrunning. */ - namespace longrunning { - - /** Represents an Operations */ - class Operations extends $protobuf.rpc.Service { - - /** - * Constructs a new Operations service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new Operations service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Operations; - - /** - * Calls ListOperations. - * @param request ListOperationsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListOperationsResponse - */ - public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; - - /** - * Calls ListOperations. - * @param request ListOperationsRequest message or plain object - * @returns Promise - */ - public listOperations(request: google.longrunning.IListOperationsRequest): Promise; - - /** - * Calls GetOperation. - * @param request GetOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; - - /** - * Calls GetOperation. - * @param request GetOperationRequest message or plain object - * @returns Promise - */ - public getOperation(request: google.longrunning.IGetOperationRequest): Promise; - - /** - * Calls DeleteOperation. - * @param request DeleteOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; - - /** - * Calls DeleteOperation. - * @param request DeleteOperationRequest message or plain object - * @returns Promise - */ - public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; - - /** - * Calls CancelOperation. - * @param request CancelOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; - - /** - * Calls CancelOperation. - * @param request CancelOperationRequest message or plain object - * @returns Promise - */ - public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; - - /** - * Calls WaitOperation. - * @param request WaitOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; - - /** - * Calls WaitOperation. - * @param request WaitOperationRequest message or plain object - * @returns Promise - */ - public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; - } - - namespace Operations { - - /** - * Callback as used by {@link google.longrunning.Operations|listOperations}. - * @param error Error, if any - * @param [response] ListOperationsResponse - */ - type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|getOperation}. - * @param error Error, if any - * @param [response] Operation - */ - type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|deleteOperation}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|cancelOperation}. - * @param error Error, if any - * @param [response] Empty - */ - type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|waitOperation}. - * @param error Error, if any - * @param [response] Operation - */ - type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } - - /** Properties of an Operation. */ - interface IOperation { - - /** Operation name */ - name?: (string|null); - - /** Operation metadata */ - metadata?: (google.protobuf.IAny|null); - - /** Operation done */ - done?: (boolean|null); - - /** Operation error */ - error?: (google.rpc.IStatus|null); - - /** Operation response */ - response?: (google.protobuf.IAny|null); - } - - /** Represents an Operation. */ - class Operation implements IOperation { - - /** - * Constructs a new Operation. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IOperation); - - /** Operation name. */ - public name: string; - - /** Operation metadata. */ - public metadata?: (google.protobuf.IAny|null); - - /** Operation done. */ - public done: boolean; - - /** Operation error. */ - public error?: (google.rpc.IStatus|null); - - /** Operation response. */ - public response?: (google.protobuf.IAny|null); - - /** Operation result. */ - public result?: ("error"|"response"); - - /** - * Creates a new Operation instance using the specified properties. - * @param [properties] Properties to set - * @returns Operation instance - */ - public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; - - /** - * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @param message Operation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @param message Operation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Operation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; - - /** - * Decodes an Operation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; - - /** - * Verifies an Operation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Operation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Operation - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; - - /** - * Creates a plain object from an Operation message. Also converts values to other types if specified. - * @param message Operation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Operation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Operation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetOperationRequest. */ - interface IGetOperationRequest { - - /** GetOperationRequest name */ - name?: (string|null); - } - - /** Represents a GetOperationRequest. */ - class GetOperationRequest implements IGetOperationRequest { - - /** - * Constructs a new GetOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IGetOperationRequest); - - /** GetOperationRequest name. */ - public name: string; - - /** - * Creates a new GetOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetOperationRequest instance - */ - public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; - - /** - * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @param message GetOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @param message GetOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; - - /** - * Verifies a GetOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; - - /** - * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. - * @param message GetOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListOperationsRequest. */ - interface IListOperationsRequest { - - /** ListOperationsRequest name */ - name?: (string|null); - - /** ListOperationsRequest filter */ - filter?: (string|null); - - /** ListOperationsRequest pageSize */ - pageSize?: (number|null); - - /** ListOperationsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListOperationsRequest. */ - class ListOperationsRequest implements IListOperationsRequest { - - /** - * Constructs a new ListOperationsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IListOperationsRequest); - - /** ListOperationsRequest name. */ - public name: string; - - /** ListOperationsRequest filter. */ - public filter: string; - - /** ListOperationsRequest pageSize. */ - public pageSize: number; - - /** ListOperationsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListOperationsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOperationsRequest instance - */ - public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; - - /** - * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @param message ListOperationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @param message ListOperationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; - - /** - * Verifies a ListOperationsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOperationsRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; - - /** - * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. - * @param message ListOperationsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListOperationsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListOperationsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListOperationsResponse. */ - interface IListOperationsResponse { - - /** ListOperationsResponse operations */ - operations?: (google.longrunning.IOperation[]|null); - - /** ListOperationsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListOperationsResponse. */ - class ListOperationsResponse implements IListOperationsResponse { - - /** - * Constructs a new ListOperationsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IListOperationsResponse); - - /** ListOperationsResponse operations. */ - public operations: google.longrunning.IOperation[]; - - /** ListOperationsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListOperationsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOperationsResponse instance - */ - public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; - - /** - * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @param message ListOperationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @param message ListOperationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; - - /** - * Verifies a ListOperationsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOperationsResponse - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; - - /** - * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. - * @param message ListOperationsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListOperationsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListOperationsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CancelOperationRequest. */ - interface ICancelOperationRequest { - - /** CancelOperationRequest name */ - name?: (string|null); - } - - /** Represents a CancelOperationRequest. */ - class CancelOperationRequest implements ICancelOperationRequest { - - /** - * Constructs a new CancelOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.ICancelOperationRequest); - - /** CancelOperationRequest name. */ - public name: string; - - /** - * Creates a new CancelOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelOperationRequest instance - */ - public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; - - /** - * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @param message CancelOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @param message CancelOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; - - /** - * Verifies a CancelOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; - - /** - * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. - * @param message CancelOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CancelOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteOperationRequest. */ - interface IDeleteOperationRequest { - - /** DeleteOperationRequest name */ - name?: (string|null); - } - - /** Represents a DeleteOperationRequest. */ - class DeleteOperationRequest implements IDeleteOperationRequest { - - /** - * Constructs a new DeleteOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IDeleteOperationRequest); - - /** DeleteOperationRequest name. */ - public name: string; - - /** - * Creates a new DeleteOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteOperationRequest instance - */ - public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; - - /** - * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @param message DeleteOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @param message DeleteOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; - - /** - * Verifies a DeleteOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; - - /** - * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. - * @param message DeleteOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WaitOperationRequest. */ - interface IWaitOperationRequest { - - /** WaitOperationRequest name */ - name?: (string|null); - - /** WaitOperationRequest timeout */ - timeout?: (google.protobuf.IDuration|null); - } - - /** Represents a WaitOperationRequest. */ - class WaitOperationRequest implements IWaitOperationRequest { - - /** - * Constructs a new WaitOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IWaitOperationRequest); - - /** WaitOperationRequest name. */ - public name: string; - - /** WaitOperationRequest timeout. */ - public timeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new WaitOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns WaitOperationRequest instance - */ - public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; - - /** - * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @param message WaitOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @param message WaitOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; - - /** - * Verifies a WaitOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WaitOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; - - /** - * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. - * @param message WaitOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WaitOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WaitOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OperationInfo. */ - interface IOperationInfo { - - /** OperationInfo responseType */ - responseType?: (string|null); - - /** OperationInfo metadataType */ - metadataType?: (string|null); - } - - /** Represents an OperationInfo. */ - class OperationInfo implements IOperationInfo { - - /** - * Constructs a new OperationInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IOperationInfo); - - /** OperationInfo responseType. */ - public responseType: string; - - /** OperationInfo metadataType. */ - public metadataType: string; - - /** - * Creates a new OperationInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationInfo instance - */ - public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; - - /** - * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @param message OperationInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @param message OperationInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OperationInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; - - /** - * Decodes an OperationInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; - - /** - * Verifies an OperationInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OperationInfo - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; - - /** - * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. - * @param message OperationInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OperationInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OperationInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace rpc. */ - namespace rpc { - - /** Properties of a Status. */ - interface IStatus { - - /** Status code */ - code?: (number|null); - - /** Status message */ - message?: (string|null); - - /** Status details */ - details?: (google.protobuf.IAny[]|null); - } - - /** Represents a Status. */ - class Status implements IStatus { - - /** - * Constructs a new Status. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IStatus); - - /** Status code. */ - public code: number; - - /** Status message. */ - public message: string; - - /** Status details. */ - public details: google.protobuf.IAny[]; - - /** - * Creates a new Status instance using the specified properties. - * @param [properties] Properties to set - * @returns Status instance - */ - public static create(properties?: google.rpc.IStatus): google.rpc.Status; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Status message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; - - /** - * Verifies a Status message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Status - */ - public static fromObject(object: { [k: string]: any }): google.rpc.Status; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @param message Status - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Status to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Status - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } -} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/protos/protos.js b/owl-bot-staging/google-cloud-datacatalog/v1/protos/protos.js deleted file mode 100644 index 5a5788157cf..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/protos/protos.js +++ /dev/null @@ -1,63902 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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 - * @property {number} CLOUD_SPANNER=6 CLOUD_SPANNER value - * @property {number} CLOUD_BIGTABLE=7 CLOUD_BIGTABLE value - * @property {number} CLOUD_SQL=8 CLOUD_SQL value - * @property {number} LOOKER=9 LOOKER value - * @property {number} VERTEX_AI=10 VERTEX_AI 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; - values[valuesById[6] = "CLOUD_SPANNER"] = 6; - values[valuesById[7] = "CLOUD_BIGTABLE"] = 7; - values[valuesById[8] = "CLOUD_SQL"] = 8; - values[valuesById[9] = "LOOKER"] = 9; - values[valuesById[10] = "VERTEX_AI"] = 10; - return values; - })(); - - /** - * ManagingSystem enum. - * @name google.cloud.datacatalog.v1.ManagingSystem - * @enum {number} - * @property {number} MANAGING_SYSTEM_UNSPECIFIED=0 MANAGING_SYSTEM_UNSPECIFIED value - * @property {number} MANAGING_SYSTEM_DATAPLEX=1 MANAGING_SYSTEM_DATAPLEX value - * @property {number} MANAGING_SYSTEM_OTHER=2 MANAGING_SYSTEM_OTHER value - */ - v1.ManagingSystem = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MANAGING_SYSTEM_UNSPECIFIED"] = 0; - values[valuesById[1] = "MANAGING_SYSTEM_DATAPLEX"] = 1; - values[valuesById[2] = "MANAGING_SYSTEM_OTHER"] = 2; - 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|reconcileTags}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef ReconcileTagsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ReconcileTags. - * @function reconcileTags - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IReconcileTagsRequest} request ReconcileTagsRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.ReconcileTagsCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.reconcileTags = function reconcileTags(request, callback) { - return this.rpcCall(reconcileTags, $root.google.cloud.datacatalog.v1.ReconcileTagsRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ReconcileTags" }); - - /** - * Calls ReconcileTags. - * @function reconcileTags - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IReconcileTagsRequest} request ReconcileTagsRequest 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 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|importEntries}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef ImportEntriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ImportEntries. - * @function importEntries - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IImportEntriesRequest} request ImportEntriesRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.ImportEntriesCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.importEntries = function importEntries(request, callback) { - return this.rpcCall(importEntries, $root.google.cloud.datacatalog.v1.ImportEntriesRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ImportEntries" }); - - /** - * Calls ImportEntries. - * @function importEntries - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IImportEntriesRequest} request ImportEntriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|setConfig}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef SetConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.MigrationConfig} [response] MigrationConfig - */ - - /** - * Calls SetConfig. - * @function setConfig - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.ISetConfigRequest} request SetConfigRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.SetConfigCallback} callback Node-style callback called with the error, if any, and MigrationConfig - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.setConfig = function setConfig(request, callback) { - return this.rpcCall(setConfig, $root.google.cloud.datacatalog.v1.SetConfigRequest, $root.google.cloud.datacatalog.v1.MigrationConfig, request, callback); - }, "name", { value: "SetConfig" }); - - /** - * Calls SetConfig. - * @function setConfig - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.ISetConfigRequest} request SetConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|retrieveConfig}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef RetrieveConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.OrganizationConfig} [response] OrganizationConfig - */ - - /** - * Calls RetrieveConfig. - * @function retrieveConfig - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IRetrieveConfigRequest} request RetrieveConfigRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.RetrieveConfigCallback} callback Node-style callback called with the error, if any, and OrganizationConfig - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.retrieveConfig = function retrieveConfig(request, callback) { - return this.rpcCall(retrieveConfig, $root.google.cloud.datacatalog.v1.RetrieveConfigRequest, $root.google.cloud.datacatalog.v1.OrganizationConfig, request, callback); - }, "name", { value: "RetrieveConfig" }); - - /** - * Calls RetrieveConfig. - * @function retrieveConfig - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IRetrieveConfigRequest} request RetrieveConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|retrieveEffectiveConfig}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef RetrieveEffectiveConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.MigrationConfig} [response] MigrationConfig - */ - - /** - * Calls RetrieveEffectiveConfig. - * @function retrieveEffectiveConfig - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest} request RetrieveEffectiveConfigRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.RetrieveEffectiveConfigCallback} callback Node-style callback called with the error, if any, and MigrationConfig - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.retrieveEffectiveConfig = function retrieveEffectiveConfig(request, callback) { - return this.rpcCall(retrieveEffectiveConfig, $root.google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest, $root.google.cloud.datacatalog.v1.MigrationConfig, request, callback); - }, "name", { value: "RetrieveEffectiveConfig" }); - - /** - * Calls RetrieveEffectiveConfig. - * @function retrieveEffectiveConfig - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest} request RetrieveEffectiveConfigRequest 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 - * @property {boolean|null} [adminSearch] SearchCatalogRequest adminSearch - */ - - /** - * 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 = ""; - - /** - * SearchCatalogRequest adminSearch. - * @member {boolean} adminSearch - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest - * @instance - */ - SearchCatalogRequest.prototype.adminSearch = false; - - /** - * 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(); - if (message.adminSearch != null && Object.hasOwnProperty.call(message, "adminSearch")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.adminSearch); - 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; - } - case 17: { - message.adminSearch = reader.bool(); - 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"; - if (message.adminSearch != null && message.hasOwnProperty("adminSearch")) - if (typeof message.adminSearch !== "boolean") - return "adminSearch: boolean 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); - if (object.adminSearch != null) - message.adminSearch = Boolean(object.adminSearch); - 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; - object.adminSearch = false; - } - 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); - if (message.adminSearch != null && message.hasOwnProperty("adminSearch")) - object.adminSearch = message.adminSearch; - 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 {number|null} [totalSize] SearchCatalogResponse totalSize - * @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 totalSize. - * @member {number} totalSize - * @memberof google.cloud.datacatalog.v1.SearchCatalogResponse - * @instance - */ - SearchCatalogResponse.prototype.totalSize = 0; - - /** - * 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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.totalSize); - 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 2: { - message.totalSize = reader.int32(); - 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.totalSize != null && message.hasOwnProperty("totalSize")) - if (!$util.isInteger(message.totalSize)) - return "totalSize: integer expected"; - 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.totalSize != null) - message.totalSize = object.totalSize | 0; - 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.totalSize = 0; - 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.totalSize != null && message.hasOwnProperty("totalSize")) - object.totalSize = message.totalSize; - 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 - * @property {string|null} [project] LookupEntryRequest project - * @property {string|null} [location] LookupEntryRequest location - */ - - /** - * 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; - - /** - * LookupEntryRequest project. - * @member {string} project - * @memberof google.cloud.datacatalog.v1.LookupEntryRequest - * @instance - */ - LookupEntryRequest.prototype.project = ""; - - /** - * LookupEntryRequest location. - * @member {string} location - * @memberof google.cloud.datacatalog.v1.LookupEntryRequest - * @instance - */ - LookupEntryRequest.prototype.location = ""; - - // 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); - if (message.project != null && Object.hasOwnProperty.call(message, "project")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.project); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.location); - 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; - } - case 6: { - message.project = reader.string(); - break; - } - case 7: { - message.location = 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"; - } - if (message.project != null && message.hasOwnProperty("project")) - if (!$util.isString(message.project)) - return "project: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: 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); - if (object.project != null) - message.project = String(object.project); - if (object.location != null) - message.location = String(object.location); - 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 (options.defaults) { - object.project = ""; - object.location = ""; - } - 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"; - } - if (message.project != null && message.hasOwnProperty("project")) - object.project = message.project; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - 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.ISqlDatabaseSystemSpec|null} [sqlDatabaseSystemSpec] Entry sqlDatabaseSystemSpec - * @property {google.cloud.datacatalog.v1.ILookerSystemSpec|null} [lookerSystemSpec] Entry lookerSystemSpec - * @property {google.cloud.datacatalog.v1.ICloudBigtableSystemSpec|null} [cloudBigtableSystemSpec] Entry cloudBigtableSystemSpec - * @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.IDatasetSpec|null} [datasetSpec] Entry datasetSpec - * @property {google.cloud.datacatalog.v1.IFilesetSpec|null} [filesetSpec] Entry filesetSpec - * @property {google.cloud.datacatalog.v1.IServiceSpec|null} [serviceSpec] Entry serviceSpec - * @property {google.cloud.datacatalog.v1.IModelSpec|null} [modelSpec] Entry modelSpec - * @property {google.cloud.datacatalog.v1.IFeatureOnlineStoreSpec|null} [featureOnlineStoreSpec] Entry featureOnlineStoreSpec - * @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 sqlDatabaseSystemSpec. - * @member {google.cloud.datacatalog.v1.ISqlDatabaseSystemSpec|null|undefined} sqlDatabaseSystemSpec - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.sqlDatabaseSystemSpec = null; - - /** - * Entry lookerSystemSpec. - * @member {google.cloud.datacatalog.v1.ILookerSystemSpec|null|undefined} lookerSystemSpec - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.lookerSystemSpec = null; - - /** - * Entry cloudBigtableSystemSpec. - * @member {google.cloud.datacatalog.v1.ICloudBigtableSystemSpec|null|undefined} cloudBigtableSystemSpec - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.cloudBigtableSystemSpec = 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 datasetSpec. - * @member {google.cloud.datacatalog.v1.IDatasetSpec|null|undefined} datasetSpec - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.datasetSpec = null; - - /** - * Entry filesetSpec. - * @member {google.cloud.datacatalog.v1.IFilesetSpec|null|undefined} filesetSpec - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.filesetSpec = null; - - /** - * Entry serviceSpec. - * @member {google.cloud.datacatalog.v1.IServiceSpec|null|undefined} serviceSpec - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.serviceSpec = null; - - /** - * Entry modelSpec. - * @member {google.cloud.datacatalog.v1.IModelSpec|null|undefined} modelSpec - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.modelSpec = null; - - /** - * Entry featureOnlineStoreSpec. - * @member {google.cloud.datacatalog.v1.IFeatureOnlineStoreSpec|null|undefined} featureOnlineStoreSpec - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.featureOnlineStoreSpec = 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 systemSpec. - * @member {"sqlDatabaseSystemSpec"|"lookerSystemSpec"|"cloudBigtableSystemSpec"|undefined} systemSpec - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Object.defineProperty(Entry.prototype, "systemSpec", { - get: $util.oneOfGetter($oneOfFields = ["sqlDatabaseSystemSpec", "lookerSystemSpec", "cloudBigtableSystemSpec"]), - 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"|"datasetSpec"|"filesetSpec"|"serviceSpec"|"modelSpec"|"featureOnlineStoreSpec"|undefined} spec - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Object.defineProperty(Entry.prototype, "spec", { - get: $util.oneOfGetter($oneOfFields = ["databaseTableSpec", "dataSourceConnectionSpec", "routineSpec", "datasetSpec", "filesetSpec", "serviceSpec", "modelSpec", "featureOnlineStoreSpec"]), - 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.datasetSpec != null && Object.hasOwnProperty.call(message, "datasetSpec")) - $root.google.cloud.datacatalog.v1.DatasetSpec.encode(message.datasetSpec, writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); - 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(); - if (message.sqlDatabaseSystemSpec != null && Object.hasOwnProperty.call(message, "sqlDatabaseSystemSpec")) - $root.google.cloud.datacatalog.v1.SqlDatabaseSystemSpec.encode(message.sqlDatabaseSystemSpec, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); - if (message.lookerSystemSpec != null && Object.hasOwnProperty.call(message, "lookerSystemSpec")) - $root.google.cloud.datacatalog.v1.LookerSystemSpec.encode(message.lookerSystemSpec, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); - if (message.cloudBigtableSystemSpec != null && Object.hasOwnProperty.call(message, "cloudBigtableSystemSpec")) - $root.google.cloud.datacatalog.v1.CloudBigtableSystemSpec.encode(message.cloudBigtableSystemSpec, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim(); - if (message.serviceSpec != null && Object.hasOwnProperty.call(message, "serviceSpec")) - $root.google.cloud.datacatalog.v1.ServiceSpec.encode(message.serviceSpec, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); - if (message.modelSpec != null && Object.hasOwnProperty.call(message, "modelSpec")) - $root.google.cloud.datacatalog.v1.ModelSpec.encode(message.modelSpec, writer.uint32(/* id 43, wireType 2 =*/346).fork()).ldelim(); - if (message.featureOnlineStoreSpec != null && Object.hasOwnProperty.call(message, "featureOnlineStoreSpec")) - $root.google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.encode(message.featureOnlineStoreSpec, writer.uint32(/* id 45, wireType 2 =*/362).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 39: { - message.sqlDatabaseSystemSpec = $root.google.cloud.datacatalog.v1.SqlDatabaseSystemSpec.decode(reader, reader.uint32()); - break; - } - case 40: { - message.lookerSystemSpec = $root.google.cloud.datacatalog.v1.LookerSystemSpec.decode(reader, reader.uint32()); - break; - } - case 41: { - message.cloudBigtableSystemSpec = $root.google.cloud.datacatalog.v1.CloudBigtableSystemSpec.decode(reader, reader.uint32()); - 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 32: { - message.datasetSpec = $root.google.cloud.datacatalog.v1.DatasetSpec.decode(reader, reader.uint32()); - break; - } - case 33: { - message.filesetSpec = $root.google.cloud.datacatalog.v1.FilesetSpec.decode(reader, reader.uint32()); - break; - } - case 42: { - message.serviceSpec = $root.google.cloud.datacatalog.v1.ServiceSpec.decode(reader, reader.uint32()); - break; - } - case 43: { - message.modelSpec = $root.google.cloud.datacatalog.v1.ModelSpec.decode(reader, reader.uint32()); - break; - } - case 45: { - message.featureOnlineStoreSpec = $root.google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.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: - case 15: - case 16: - case 17: - case 18: - case 19: - case 20: - case 21: - 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: - case 6: - case 7: - case 8: - case 9: - case 10: - 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.sqlDatabaseSystemSpec != null && message.hasOwnProperty("sqlDatabaseSystemSpec")) { - properties.systemSpec = 1; - { - var error = $root.google.cloud.datacatalog.v1.SqlDatabaseSystemSpec.verify(message.sqlDatabaseSystemSpec); - if (error) - return "sqlDatabaseSystemSpec." + error; - } - } - if (message.lookerSystemSpec != null && message.hasOwnProperty("lookerSystemSpec")) { - if (properties.systemSpec === 1) - return "systemSpec: multiple values"; - properties.systemSpec = 1; - { - var error = $root.google.cloud.datacatalog.v1.LookerSystemSpec.verify(message.lookerSystemSpec); - if (error) - return "lookerSystemSpec." + error; - } - } - if (message.cloudBigtableSystemSpec != null && message.hasOwnProperty("cloudBigtableSystemSpec")) { - if (properties.systemSpec === 1) - return "systemSpec: multiple values"; - properties.systemSpec = 1; - { - var error = $root.google.cloud.datacatalog.v1.CloudBigtableSystemSpec.verify(message.cloudBigtableSystemSpec); - if (error) - return "cloudBigtableSystemSpec." + error; - } - } - 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.datasetSpec != null && message.hasOwnProperty("datasetSpec")) { - if (properties.spec === 1) - return "spec: multiple values"; - properties.spec = 1; - { - var error = $root.google.cloud.datacatalog.v1.DatasetSpec.verify(message.datasetSpec); - if (error) - return "datasetSpec." + 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.serviceSpec != null && message.hasOwnProperty("serviceSpec")) { - if (properties.spec === 1) - return "spec: multiple values"; - properties.spec = 1; - { - var error = $root.google.cloud.datacatalog.v1.ServiceSpec.verify(message.serviceSpec); - if (error) - return "serviceSpec." + error; - } - } - if (message.modelSpec != null && message.hasOwnProperty("modelSpec")) { - if (properties.spec === 1) - return "spec: multiple values"; - properties.spec = 1; - { - var error = $root.google.cloud.datacatalog.v1.ModelSpec.verify(message.modelSpec); - if (error) - return "modelSpec." + error; - } - } - if (message.featureOnlineStoreSpec != null && message.hasOwnProperty("featureOnlineStoreSpec")) { - if (properties.spec === 1) - return "spec: multiple values"; - properties.spec = 1; - { - var error = $root.google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.verify(message.featureOnlineStoreSpec); - if (error) - return "featureOnlineStoreSpec." + 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; - case "DATABASE_SCHEMA": - case 15: - message.type = 15; - break; - case "DASHBOARD": - case 16: - message.type = 16; - break; - case "EXPLORE": - case 17: - message.type = 17; - break; - case "LOOK": - case 18: - message.type = 18; - break; - case "FEATURE_ONLINE_STORE": - case 19: - message.type = 19; - break; - case "FEATURE_VIEW": - case 20: - message.type = 20; - break; - case "FEATURE_GROUP": - case 21: - message.type = 21; - 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; - case "CLOUD_SPANNER": - case 6: - message.integratedSystem = 6; - break; - case "CLOUD_BIGTABLE": - case 7: - message.integratedSystem = 7; - break; - case "CLOUD_SQL": - case 8: - message.integratedSystem = 8; - break; - case "LOOKER": - case 9: - message.integratedSystem = 9; - break; - case "VERTEX_AI": - case 10: - message.integratedSystem = 10; - break; - } - if (object.userSpecifiedSystem != null) - message.userSpecifiedSystem = String(object.userSpecifiedSystem); - if (object.sqlDatabaseSystemSpec != null) { - if (typeof object.sqlDatabaseSystemSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Entry.sqlDatabaseSystemSpec: object expected"); - message.sqlDatabaseSystemSpec = $root.google.cloud.datacatalog.v1.SqlDatabaseSystemSpec.fromObject(object.sqlDatabaseSystemSpec); - } - if (object.lookerSystemSpec != null) { - if (typeof object.lookerSystemSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Entry.lookerSystemSpec: object expected"); - message.lookerSystemSpec = $root.google.cloud.datacatalog.v1.LookerSystemSpec.fromObject(object.lookerSystemSpec); - } - if (object.cloudBigtableSystemSpec != null) { - if (typeof object.cloudBigtableSystemSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Entry.cloudBigtableSystemSpec: object expected"); - message.cloudBigtableSystemSpec = $root.google.cloud.datacatalog.v1.CloudBigtableSystemSpec.fromObject(object.cloudBigtableSystemSpec); - } - 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.datasetSpec != null) { - if (typeof object.datasetSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Entry.datasetSpec: object expected"); - message.datasetSpec = $root.google.cloud.datacatalog.v1.DatasetSpec.fromObject(object.datasetSpec); - } - 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.serviceSpec != null) { - if (typeof object.serviceSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Entry.serviceSpec: object expected"); - message.serviceSpec = $root.google.cloud.datacatalog.v1.ServiceSpec.fromObject(object.serviceSpec); - } - if (object.modelSpec != null) { - if (typeof object.modelSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Entry.modelSpec: object expected"); - message.modelSpec = $root.google.cloud.datacatalog.v1.ModelSpec.fromObject(object.modelSpec); - } - if (object.featureOnlineStoreSpec != null) { - if (typeof object.featureOnlineStoreSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Entry.featureOnlineStoreSpec: object expected"); - message.featureOnlineStoreSpec = $root.google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.fromObject(object.featureOnlineStoreSpec); - } - 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.datasetSpec != null && message.hasOwnProperty("datasetSpec")) { - object.datasetSpec = $root.google.cloud.datacatalog.v1.DatasetSpec.toObject(message.datasetSpec, options); - if (options.oneofs) - object.spec = "datasetSpec"; - } - 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); - if (message.sqlDatabaseSystemSpec != null && message.hasOwnProperty("sqlDatabaseSystemSpec")) { - object.sqlDatabaseSystemSpec = $root.google.cloud.datacatalog.v1.SqlDatabaseSystemSpec.toObject(message.sqlDatabaseSystemSpec, options); - if (options.oneofs) - object.systemSpec = "sqlDatabaseSystemSpec"; - } - if (message.lookerSystemSpec != null && message.hasOwnProperty("lookerSystemSpec")) { - object.lookerSystemSpec = $root.google.cloud.datacatalog.v1.LookerSystemSpec.toObject(message.lookerSystemSpec, options); - if (options.oneofs) - object.systemSpec = "lookerSystemSpec"; - } - if (message.cloudBigtableSystemSpec != null && message.hasOwnProperty("cloudBigtableSystemSpec")) { - object.cloudBigtableSystemSpec = $root.google.cloud.datacatalog.v1.CloudBigtableSystemSpec.toObject(message.cloudBigtableSystemSpec, options); - if (options.oneofs) - object.systemSpec = "cloudBigtableSystemSpec"; - } - if (message.serviceSpec != null && message.hasOwnProperty("serviceSpec")) { - object.serviceSpec = $root.google.cloud.datacatalog.v1.ServiceSpec.toObject(message.serviceSpec, options); - if (options.oneofs) - object.spec = "serviceSpec"; - } - if (message.modelSpec != null && message.hasOwnProperty("modelSpec")) { - object.modelSpec = $root.google.cloud.datacatalog.v1.ModelSpec.toObject(message.modelSpec, options); - if (options.oneofs) - object.spec = "modelSpec"; - } - if (message.featureOnlineStoreSpec != null && message.hasOwnProperty("featureOnlineStoreSpec")) { - object.featureOnlineStoreSpec = $root.google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.toObject(message.featureOnlineStoreSpec, options); - if (options.oneofs) - object.spec = "featureOnlineStoreSpec"; - } - 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 - * @property {google.cloud.datacatalog.v1.DatabaseTableSpec.IDatabaseViewSpec|null} [databaseViewSpec] DatabaseTableSpec databaseViewSpec - */ - - /** - * 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; - - /** - * DatabaseTableSpec databaseViewSpec. - * @member {google.cloud.datacatalog.v1.DatabaseTableSpec.IDatabaseViewSpec|null|undefined} databaseViewSpec - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec - * @instance - */ - DatabaseTableSpec.prototype.databaseViewSpec = 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(); - if (message.databaseViewSpec != null && Object.hasOwnProperty.call(message, "databaseViewSpec")) - $root.google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.encode(message.databaseViewSpec, writer.uint32(/* id 3, wireType 2 =*/26).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; - } - case 3: { - message.databaseViewSpec = $root.google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.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; - } - if (message.databaseViewSpec != null && message.hasOwnProperty("databaseViewSpec")) { - var error = $root.google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.verify(message.databaseViewSpec); - if (error) - return "databaseViewSpec." + 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); - } - if (object.databaseViewSpec != null) { - if (typeof object.databaseViewSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1.DatabaseTableSpec.databaseViewSpec: object expected"); - message.databaseViewSpec = $root.google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.fromObject(object.databaseViewSpec); - } - 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; - object.databaseViewSpec = 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); - if (message.databaseViewSpec != null && message.hasOwnProperty("databaseViewSpec")) - object.databaseViewSpec = $root.google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.toObject(message.databaseViewSpec, 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; - })(); - - DatabaseTableSpec.DatabaseViewSpec = (function() { - - /** - * Properties of a DatabaseViewSpec. - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec - * @interface IDatabaseViewSpec - * @property {google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType|null} [viewType] DatabaseViewSpec viewType - * @property {string|null} [baseTable] DatabaseViewSpec baseTable - * @property {string|null} [sqlQuery] DatabaseViewSpec sqlQuery - */ - - /** - * Constructs a new DatabaseViewSpec. - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec - * @classdesc Represents a DatabaseViewSpec. - * @implements IDatabaseViewSpec - * @constructor - * @param {google.cloud.datacatalog.v1.DatabaseTableSpec.IDatabaseViewSpec=} [properties] Properties to set - */ - function DatabaseViewSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DatabaseViewSpec viewType. - * @member {google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType} viewType - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec - * @instance - */ - DatabaseViewSpec.prototype.viewType = 0; - - /** - * DatabaseViewSpec baseTable. - * @member {string|null|undefined} baseTable - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec - * @instance - */ - DatabaseViewSpec.prototype.baseTable = null; - - /** - * DatabaseViewSpec sqlQuery. - * @member {string|null|undefined} sqlQuery - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec - * @instance - */ - DatabaseViewSpec.prototype.sqlQuery = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DatabaseViewSpec sourceDefinition. - * @member {"baseTable"|"sqlQuery"|undefined} sourceDefinition - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec - * @instance - */ - Object.defineProperty(DatabaseViewSpec.prototype, "sourceDefinition", { - get: $util.oneOfGetter($oneOfFields = ["baseTable", "sqlQuery"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DatabaseViewSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec - * @static - * @param {google.cloud.datacatalog.v1.DatabaseTableSpec.IDatabaseViewSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec} DatabaseViewSpec instance - */ - DatabaseViewSpec.create = function create(properties) { - return new DatabaseViewSpec(properties); - }; - - /** - * Encodes the specified DatabaseViewSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec - * @static - * @param {google.cloud.datacatalog.v1.DatabaseTableSpec.IDatabaseViewSpec} message DatabaseViewSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatabaseViewSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.viewType != null && Object.hasOwnProperty.call(message, "viewType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.viewType); - if (message.baseTable != null && Object.hasOwnProperty.call(message, "baseTable")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.baseTable); - if (message.sqlQuery != null && Object.hasOwnProperty.call(message, "sqlQuery")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sqlQuery); - return writer; - }; - - /** - * Encodes the specified DatabaseViewSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec - * @static - * @param {google.cloud.datacatalog.v1.DatabaseTableSpec.IDatabaseViewSpec} message DatabaseViewSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatabaseViewSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DatabaseViewSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec - * @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.DatabaseViewSpec} DatabaseViewSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatabaseViewSpec.decode = function decode(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.DatabaseViewSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.viewType = reader.int32(); - break; - } - case 2: { - message.baseTable = reader.string(); - break; - } - case 3: { - message.sqlQuery = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DatabaseViewSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec} DatabaseViewSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatabaseViewSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DatabaseViewSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DatabaseViewSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.viewType != null && message.hasOwnProperty("viewType")) - switch (message.viewType) { - default: - return "viewType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.baseTable != null && message.hasOwnProperty("baseTable")) { - properties.sourceDefinition = 1; - if (!$util.isString(message.baseTable)) - return "baseTable: string expected"; - } - if (message.sqlQuery != null && message.hasOwnProperty("sqlQuery")) { - if (properties.sourceDefinition === 1) - return "sourceDefinition: multiple values"; - properties.sourceDefinition = 1; - if (!$util.isString(message.sqlQuery)) - return "sqlQuery: string expected"; - } - return null; - }; - - /** - * Creates a DatabaseViewSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec} DatabaseViewSpec - */ - DatabaseViewSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec(); - switch (object.viewType) { - default: - if (typeof object.viewType === "number") { - message.viewType = object.viewType; - break; - } - break; - case "VIEW_TYPE_UNSPECIFIED": - case 0: - message.viewType = 0; - break; - case "STANDARD_VIEW": - case 1: - message.viewType = 1; - break; - case "MATERIALIZED_VIEW": - case 2: - message.viewType = 2; - break; - } - if (object.baseTable != null) - message.baseTable = String(object.baseTable); - if (object.sqlQuery != null) - message.sqlQuery = String(object.sqlQuery); - return message; - }; - - /** - * Creates a plain object from a DatabaseViewSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec - * @static - * @param {google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec} message DatabaseViewSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DatabaseViewSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.viewType = options.enums === String ? "VIEW_TYPE_UNSPECIFIED" : 0; - if (message.viewType != null && message.hasOwnProperty("viewType")) - object.viewType = options.enums === String ? $root.google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType[message.viewType] === undefined ? message.viewType : $root.google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType[message.viewType] : message.viewType; - if (message.baseTable != null && message.hasOwnProperty("baseTable")) { - object.baseTable = message.baseTable; - if (options.oneofs) - object.sourceDefinition = "baseTable"; - } - if (message.sqlQuery != null && message.hasOwnProperty("sqlQuery")) { - object.sqlQuery = message.sqlQuery; - if (options.oneofs) - object.sourceDefinition = "sqlQuery"; - } - return object; - }; - - /** - * Converts this DatabaseViewSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec - * @instance - * @returns {Object.} JSON object - */ - DatabaseViewSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DatabaseViewSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DatabaseViewSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec"; - }; - - /** - * ViewType enum. - * @name google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType - * @enum {number} - * @property {number} VIEW_TYPE_UNSPECIFIED=0 VIEW_TYPE_UNSPECIFIED value - * @property {number} STANDARD_VIEW=1 STANDARD_VIEW value - * @property {number} MATERIALIZED_VIEW=2 MATERIALIZED_VIEW value - */ - DatabaseViewSpec.ViewType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VIEW_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "STANDARD_VIEW"] = 1; - values[valuesById[2] = "MATERIALIZED_VIEW"] = 2; - return values; - })(); - - return DatabaseViewSpec; - })(); - - 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.DatasetSpec = (function() { - - /** - * Properties of a DatasetSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface IDatasetSpec - * @property {google.cloud.datacatalog.v1.IVertexDatasetSpec|null} [vertexDatasetSpec] DatasetSpec vertexDatasetSpec - */ - - /** - * Constructs a new DatasetSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a DatasetSpec. - * @implements IDatasetSpec - * @constructor - * @param {google.cloud.datacatalog.v1.IDatasetSpec=} [properties] Properties to set - */ - function DatasetSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DatasetSpec vertexDatasetSpec. - * @member {google.cloud.datacatalog.v1.IVertexDatasetSpec|null|undefined} vertexDatasetSpec - * @memberof google.cloud.datacatalog.v1.DatasetSpec - * @instance - */ - DatasetSpec.prototype.vertexDatasetSpec = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DatasetSpec systemSpec. - * @member {"vertexDatasetSpec"|undefined} systemSpec - * @memberof google.cloud.datacatalog.v1.DatasetSpec - * @instance - */ - Object.defineProperty(DatasetSpec.prototype, "systemSpec", { - get: $util.oneOfGetter($oneOfFields = ["vertexDatasetSpec"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DatasetSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.DatasetSpec - * @static - * @param {google.cloud.datacatalog.v1.IDatasetSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.DatasetSpec} DatasetSpec instance - */ - DatasetSpec.create = function create(properties) { - return new DatasetSpec(properties); - }; - - /** - * Encodes the specified DatasetSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.DatasetSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.DatasetSpec - * @static - * @param {google.cloud.datacatalog.v1.IDatasetSpec} message DatasetSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatasetSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.vertexDatasetSpec != null && Object.hasOwnProperty.call(message, "vertexDatasetSpec")) - $root.google.cloud.datacatalog.v1.VertexDatasetSpec.encode(message.vertexDatasetSpec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DatasetSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DatasetSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.DatasetSpec - * @static - * @param {google.cloud.datacatalog.v1.IDatasetSpec} message DatasetSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatasetSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DatasetSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.DatasetSpec - * @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.DatasetSpec} DatasetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatasetSpec.decode = function decode(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.DatasetSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.vertexDatasetSpec = $root.google.cloud.datacatalog.v1.VertexDatasetSpec.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DatasetSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.DatasetSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.DatasetSpec} DatasetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatasetSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DatasetSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.DatasetSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DatasetSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.vertexDatasetSpec != null && message.hasOwnProperty("vertexDatasetSpec")) { - properties.systemSpec = 1; - { - var error = $root.google.cloud.datacatalog.v1.VertexDatasetSpec.verify(message.vertexDatasetSpec); - if (error) - return "vertexDatasetSpec." + error; - } - } - return null; - }; - - /** - * Creates a DatasetSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.DatasetSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.DatasetSpec} DatasetSpec - */ - DatasetSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.DatasetSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.DatasetSpec(); - if (object.vertexDatasetSpec != null) { - if (typeof object.vertexDatasetSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1.DatasetSpec.vertexDatasetSpec: object expected"); - message.vertexDatasetSpec = $root.google.cloud.datacatalog.v1.VertexDatasetSpec.fromObject(object.vertexDatasetSpec); - } - return message; - }; - - /** - * Creates a plain object from a DatasetSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.DatasetSpec - * @static - * @param {google.cloud.datacatalog.v1.DatasetSpec} message DatasetSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DatasetSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.vertexDatasetSpec != null && message.hasOwnProperty("vertexDatasetSpec")) { - object.vertexDatasetSpec = $root.google.cloud.datacatalog.v1.VertexDatasetSpec.toObject(message.vertexDatasetSpec, options); - if (options.oneofs) - object.systemSpec = "vertexDatasetSpec"; - } - return object; - }; - - /** - * Converts this DatasetSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.DatasetSpec - * @instance - * @returns {Object.} JSON object - */ - DatasetSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DatasetSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.DatasetSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DatasetSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.DatasetSpec"; - }; - - return DatasetSpec; - })(); - - v1.SqlDatabaseSystemSpec = (function() { - - /** - * Properties of a SqlDatabaseSystemSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface ISqlDatabaseSystemSpec - * @property {string|null} [sqlEngine] SqlDatabaseSystemSpec sqlEngine - * @property {string|null} [databaseVersion] SqlDatabaseSystemSpec databaseVersion - * @property {string|null} [instanceHost] SqlDatabaseSystemSpec instanceHost - */ - - /** - * Constructs a new SqlDatabaseSystemSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a SqlDatabaseSystemSpec. - * @implements ISqlDatabaseSystemSpec - * @constructor - * @param {google.cloud.datacatalog.v1.ISqlDatabaseSystemSpec=} [properties] Properties to set - */ - function SqlDatabaseSystemSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SqlDatabaseSystemSpec sqlEngine. - * @member {string} sqlEngine - * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec - * @instance - */ - SqlDatabaseSystemSpec.prototype.sqlEngine = ""; - - /** - * SqlDatabaseSystemSpec databaseVersion. - * @member {string} databaseVersion - * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec - * @instance - */ - SqlDatabaseSystemSpec.prototype.databaseVersion = ""; - - /** - * SqlDatabaseSystemSpec instanceHost. - * @member {string} instanceHost - * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec - * @instance - */ - SqlDatabaseSystemSpec.prototype.instanceHost = ""; - - /** - * Creates a new SqlDatabaseSystemSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec - * @static - * @param {google.cloud.datacatalog.v1.ISqlDatabaseSystemSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.SqlDatabaseSystemSpec} SqlDatabaseSystemSpec instance - */ - SqlDatabaseSystemSpec.create = function create(properties) { - return new SqlDatabaseSystemSpec(properties); - }; - - /** - * Encodes the specified SqlDatabaseSystemSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.SqlDatabaseSystemSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec - * @static - * @param {google.cloud.datacatalog.v1.ISqlDatabaseSystemSpec} message SqlDatabaseSystemSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlDatabaseSystemSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sqlEngine != null && Object.hasOwnProperty.call(message, "sqlEngine")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sqlEngine); - if (message.databaseVersion != null && Object.hasOwnProperty.call(message, "databaseVersion")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.databaseVersion); - if (message.instanceHost != null && Object.hasOwnProperty.call(message, "instanceHost")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.instanceHost); - return writer; - }; - - /** - * Encodes the specified SqlDatabaseSystemSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.SqlDatabaseSystemSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec - * @static - * @param {google.cloud.datacatalog.v1.ISqlDatabaseSystemSpec} message SqlDatabaseSystemSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlDatabaseSystemSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SqlDatabaseSystemSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec - * @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.SqlDatabaseSystemSpec} SqlDatabaseSystemSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlDatabaseSystemSpec.decode = function decode(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.SqlDatabaseSystemSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.sqlEngine = reader.string(); - break; - } - case 2: { - message.databaseVersion = reader.string(); - break; - } - case 3: { - message.instanceHost = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SqlDatabaseSystemSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.SqlDatabaseSystemSpec} SqlDatabaseSystemSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlDatabaseSystemSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SqlDatabaseSystemSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SqlDatabaseSystemSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sqlEngine != null && message.hasOwnProperty("sqlEngine")) - if (!$util.isString(message.sqlEngine)) - return "sqlEngine: string expected"; - if (message.databaseVersion != null && message.hasOwnProperty("databaseVersion")) - if (!$util.isString(message.databaseVersion)) - return "databaseVersion: string expected"; - if (message.instanceHost != null && message.hasOwnProperty("instanceHost")) - if (!$util.isString(message.instanceHost)) - return "instanceHost: string expected"; - return null; - }; - - /** - * Creates a SqlDatabaseSystemSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.SqlDatabaseSystemSpec} SqlDatabaseSystemSpec - */ - SqlDatabaseSystemSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.SqlDatabaseSystemSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.SqlDatabaseSystemSpec(); - if (object.sqlEngine != null) - message.sqlEngine = String(object.sqlEngine); - if (object.databaseVersion != null) - message.databaseVersion = String(object.databaseVersion); - if (object.instanceHost != null) - message.instanceHost = String(object.instanceHost); - return message; - }; - - /** - * Creates a plain object from a SqlDatabaseSystemSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec - * @static - * @param {google.cloud.datacatalog.v1.SqlDatabaseSystemSpec} message SqlDatabaseSystemSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SqlDatabaseSystemSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sqlEngine = ""; - object.databaseVersion = ""; - object.instanceHost = ""; - } - if (message.sqlEngine != null && message.hasOwnProperty("sqlEngine")) - object.sqlEngine = message.sqlEngine; - if (message.databaseVersion != null && message.hasOwnProperty("databaseVersion")) - object.databaseVersion = message.databaseVersion; - if (message.instanceHost != null && message.hasOwnProperty("instanceHost")) - object.instanceHost = message.instanceHost; - return object; - }; - - /** - * Converts this SqlDatabaseSystemSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec - * @instance - * @returns {Object.} JSON object - */ - SqlDatabaseSystemSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SqlDatabaseSystemSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.SqlDatabaseSystemSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SqlDatabaseSystemSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.SqlDatabaseSystemSpec"; - }; - - return SqlDatabaseSystemSpec; - })(); - - v1.LookerSystemSpec = (function() { - - /** - * Properties of a LookerSystemSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface ILookerSystemSpec - * @property {string|null} [parentInstanceId] LookerSystemSpec parentInstanceId - * @property {string|null} [parentInstanceDisplayName] LookerSystemSpec parentInstanceDisplayName - * @property {string|null} [parentModelId] LookerSystemSpec parentModelId - * @property {string|null} [parentModelDisplayName] LookerSystemSpec parentModelDisplayName - * @property {string|null} [parentViewId] LookerSystemSpec parentViewId - * @property {string|null} [parentViewDisplayName] LookerSystemSpec parentViewDisplayName - */ - - /** - * Constructs a new LookerSystemSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a LookerSystemSpec. - * @implements ILookerSystemSpec - * @constructor - * @param {google.cloud.datacatalog.v1.ILookerSystemSpec=} [properties] Properties to set - */ - function LookerSystemSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LookerSystemSpec parentInstanceId. - * @member {string} parentInstanceId - * @memberof google.cloud.datacatalog.v1.LookerSystemSpec - * @instance - */ - LookerSystemSpec.prototype.parentInstanceId = ""; - - /** - * LookerSystemSpec parentInstanceDisplayName. - * @member {string} parentInstanceDisplayName - * @memberof google.cloud.datacatalog.v1.LookerSystemSpec - * @instance - */ - LookerSystemSpec.prototype.parentInstanceDisplayName = ""; - - /** - * LookerSystemSpec parentModelId. - * @member {string} parentModelId - * @memberof google.cloud.datacatalog.v1.LookerSystemSpec - * @instance - */ - LookerSystemSpec.prototype.parentModelId = ""; - - /** - * LookerSystemSpec parentModelDisplayName. - * @member {string} parentModelDisplayName - * @memberof google.cloud.datacatalog.v1.LookerSystemSpec - * @instance - */ - LookerSystemSpec.prototype.parentModelDisplayName = ""; - - /** - * LookerSystemSpec parentViewId. - * @member {string} parentViewId - * @memberof google.cloud.datacatalog.v1.LookerSystemSpec - * @instance - */ - LookerSystemSpec.prototype.parentViewId = ""; - - /** - * LookerSystemSpec parentViewDisplayName. - * @member {string} parentViewDisplayName - * @memberof google.cloud.datacatalog.v1.LookerSystemSpec - * @instance - */ - LookerSystemSpec.prototype.parentViewDisplayName = ""; - - /** - * Creates a new LookerSystemSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.LookerSystemSpec - * @static - * @param {google.cloud.datacatalog.v1.ILookerSystemSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.LookerSystemSpec} LookerSystemSpec instance - */ - LookerSystemSpec.create = function create(properties) { - return new LookerSystemSpec(properties); - }; - - /** - * Encodes the specified LookerSystemSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.LookerSystemSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.LookerSystemSpec - * @static - * @param {google.cloud.datacatalog.v1.ILookerSystemSpec} message LookerSystemSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LookerSystemSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parentInstanceId != null && Object.hasOwnProperty.call(message, "parentInstanceId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parentInstanceId); - if (message.parentInstanceDisplayName != null && Object.hasOwnProperty.call(message, "parentInstanceDisplayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.parentInstanceDisplayName); - if (message.parentModelId != null && Object.hasOwnProperty.call(message, "parentModelId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.parentModelId); - if (message.parentModelDisplayName != null && Object.hasOwnProperty.call(message, "parentModelDisplayName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.parentModelDisplayName); - if (message.parentViewId != null && Object.hasOwnProperty.call(message, "parentViewId")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.parentViewId); - if (message.parentViewDisplayName != null && Object.hasOwnProperty.call(message, "parentViewDisplayName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.parentViewDisplayName); - return writer; - }; - - /** - * Encodes the specified LookerSystemSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.LookerSystemSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.LookerSystemSpec - * @static - * @param {google.cloud.datacatalog.v1.ILookerSystemSpec} message LookerSystemSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LookerSystemSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LookerSystemSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.LookerSystemSpec - * @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.LookerSystemSpec} LookerSystemSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LookerSystemSpec.decode = function decode(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.LookerSystemSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parentInstanceId = reader.string(); - break; - } - case 2: { - message.parentInstanceDisplayName = reader.string(); - break; - } - case 3: { - message.parentModelId = reader.string(); - break; - } - case 4: { - message.parentModelDisplayName = reader.string(); - break; - } - case 5: { - message.parentViewId = reader.string(); - break; - } - case 6: { - message.parentViewDisplayName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LookerSystemSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.LookerSystemSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.LookerSystemSpec} LookerSystemSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LookerSystemSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LookerSystemSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.LookerSystemSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LookerSystemSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parentInstanceId != null && message.hasOwnProperty("parentInstanceId")) - if (!$util.isString(message.parentInstanceId)) - return "parentInstanceId: string expected"; - if (message.parentInstanceDisplayName != null && message.hasOwnProperty("parentInstanceDisplayName")) - if (!$util.isString(message.parentInstanceDisplayName)) - return "parentInstanceDisplayName: string expected"; - if (message.parentModelId != null && message.hasOwnProperty("parentModelId")) - if (!$util.isString(message.parentModelId)) - return "parentModelId: string expected"; - if (message.parentModelDisplayName != null && message.hasOwnProperty("parentModelDisplayName")) - if (!$util.isString(message.parentModelDisplayName)) - return "parentModelDisplayName: string expected"; - if (message.parentViewId != null && message.hasOwnProperty("parentViewId")) - if (!$util.isString(message.parentViewId)) - return "parentViewId: string expected"; - if (message.parentViewDisplayName != null && message.hasOwnProperty("parentViewDisplayName")) - if (!$util.isString(message.parentViewDisplayName)) - return "parentViewDisplayName: string expected"; - return null; - }; - - /** - * Creates a LookerSystemSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.LookerSystemSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.LookerSystemSpec} LookerSystemSpec - */ - LookerSystemSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.LookerSystemSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.LookerSystemSpec(); - if (object.parentInstanceId != null) - message.parentInstanceId = String(object.parentInstanceId); - if (object.parentInstanceDisplayName != null) - message.parentInstanceDisplayName = String(object.parentInstanceDisplayName); - if (object.parentModelId != null) - message.parentModelId = String(object.parentModelId); - if (object.parentModelDisplayName != null) - message.parentModelDisplayName = String(object.parentModelDisplayName); - if (object.parentViewId != null) - message.parentViewId = String(object.parentViewId); - if (object.parentViewDisplayName != null) - message.parentViewDisplayName = String(object.parentViewDisplayName); - return message; - }; - - /** - * Creates a plain object from a LookerSystemSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.LookerSystemSpec - * @static - * @param {google.cloud.datacatalog.v1.LookerSystemSpec} message LookerSystemSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LookerSystemSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parentInstanceId = ""; - object.parentInstanceDisplayName = ""; - object.parentModelId = ""; - object.parentModelDisplayName = ""; - object.parentViewId = ""; - object.parentViewDisplayName = ""; - } - if (message.parentInstanceId != null && message.hasOwnProperty("parentInstanceId")) - object.parentInstanceId = message.parentInstanceId; - if (message.parentInstanceDisplayName != null && message.hasOwnProperty("parentInstanceDisplayName")) - object.parentInstanceDisplayName = message.parentInstanceDisplayName; - if (message.parentModelId != null && message.hasOwnProperty("parentModelId")) - object.parentModelId = message.parentModelId; - if (message.parentModelDisplayName != null && message.hasOwnProperty("parentModelDisplayName")) - object.parentModelDisplayName = message.parentModelDisplayName; - if (message.parentViewId != null && message.hasOwnProperty("parentViewId")) - object.parentViewId = message.parentViewId; - if (message.parentViewDisplayName != null && message.hasOwnProperty("parentViewDisplayName")) - object.parentViewDisplayName = message.parentViewDisplayName; - return object; - }; - - /** - * Converts this LookerSystemSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.LookerSystemSpec - * @instance - * @returns {Object.} JSON object - */ - LookerSystemSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LookerSystemSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.LookerSystemSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LookerSystemSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.LookerSystemSpec"; - }; - - return LookerSystemSpec; - })(); - - v1.CloudBigtableSystemSpec = (function() { - - /** - * Properties of a CloudBigtableSystemSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface ICloudBigtableSystemSpec - * @property {string|null} [instanceDisplayName] CloudBigtableSystemSpec instanceDisplayName - */ - - /** - * Constructs a new CloudBigtableSystemSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a CloudBigtableSystemSpec. - * @implements ICloudBigtableSystemSpec - * @constructor - * @param {google.cloud.datacatalog.v1.ICloudBigtableSystemSpec=} [properties] Properties to set - */ - function CloudBigtableSystemSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudBigtableSystemSpec instanceDisplayName. - * @member {string} instanceDisplayName - * @memberof google.cloud.datacatalog.v1.CloudBigtableSystemSpec - * @instance - */ - CloudBigtableSystemSpec.prototype.instanceDisplayName = ""; - - /** - * Creates a new CloudBigtableSystemSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.CloudBigtableSystemSpec - * @static - * @param {google.cloud.datacatalog.v1.ICloudBigtableSystemSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.CloudBigtableSystemSpec} CloudBigtableSystemSpec instance - */ - CloudBigtableSystemSpec.create = function create(properties) { - return new CloudBigtableSystemSpec(properties); - }; - - /** - * Encodes the specified CloudBigtableSystemSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.CloudBigtableSystemSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.CloudBigtableSystemSpec - * @static - * @param {google.cloud.datacatalog.v1.ICloudBigtableSystemSpec} message CloudBigtableSystemSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudBigtableSystemSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.instanceDisplayName != null && Object.hasOwnProperty.call(message, "instanceDisplayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.instanceDisplayName); - return writer; - }; - - /** - * Encodes the specified CloudBigtableSystemSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CloudBigtableSystemSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.CloudBigtableSystemSpec - * @static - * @param {google.cloud.datacatalog.v1.ICloudBigtableSystemSpec} message CloudBigtableSystemSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudBigtableSystemSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudBigtableSystemSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.CloudBigtableSystemSpec - * @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.CloudBigtableSystemSpec} CloudBigtableSystemSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudBigtableSystemSpec.decode = function decode(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.CloudBigtableSystemSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.instanceDisplayName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudBigtableSystemSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.CloudBigtableSystemSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.CloudBigtableSystemSpec} CloudBigtableSystemSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudBigtableSystemSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudBigtableSystemSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.CloudBigtableSystemSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudBigtableSystemSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.instanceDisplayName != null && message.hasOwnProperty("instanceDisplayName")) - if (!$util.isString(message.instanceDisplayName)) - return "instanceDisplayName: string expected"; - return null; - }; - - /** - * Creates a CloudBigtableSystemSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.CloudBigtableSystemSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.CloudBigtableSystemSpec} CloudBigtableSystemSpec - */ - CloudBigtableSystemSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.CloudBigtableSystemSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.CloudBigtableSystemSpec(); - if (object.instanceDisplayName != null) - message.instanceDisplayName = String(object.instanceDisplayName); - return message; - }; - - /** - * Creates a plain object from a CloudBigtableSystemSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.CloudBigtableSystemSpec - * @static - * @param {google.cloud.datacatalog.v1.CloudBigtableSystemSpec} message CloudBigtableSystemSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudBigtableSystemSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.instanceDisplayName = ""; - if (message.instanceDisplayName != null && message.hasOwnProperty("instanceDisplayName")) - object.instanceDisplayName = message.instanceDisplayName; - return object; - }; - - /** - * Converts this CloudBigtableSystemSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.CloudBigtableSystemSpec - * @instance - * @returns {Object.} JSON object - */ - CloudBigtableSystemSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudBigtableSystemSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.CloudBigtableSystemSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudBigtableSystemSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.CloudBigtableSystemSpec"; - }; - - return CloudBigtableSystemSpec; - })(); - - v1.CloudBigtableInstanceSpec = (function() { - - /** - * Properties of a CloudBigtableInstanceSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface ICloudBigtableInstanceSpec - * @property {Array.|null} [cloudBigtableClusterSpecs] CloudBigtableInstanceSpec cloudBigtableClusterSpecs - */ - - /** - * Constructs a new CloudBigtableInstanceSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a CloudBigtableInstanceSpec. - * @implements ICloudBigtableInstanceSpec - * @constructor - * @param {google.cloud.datacatalog.v1.ICloudBigtableInstanceSpec=} [properties] Properties to set - */ - function CloudBigtableInstanceSpec(properties) { - this.cloudBigtableClusterSpecs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudBigtableInstanceSpec cloudBigtableClusterSpecs. - * @member {Array.} cloudBigtableClusterSpecs - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec - * @instance - */ - CloudBigtableInstanceSpec.prototype.cloudBigtableClusterSpecs = $util.emptyArray; - - /** - * Creates a new CloudBigtableInstanceSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec - * @static - * @param {google.cloud.datacatalog.v1.ICloudBigtableInstanceSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.CloudBigtableInstanceSpec} CloudBigtableInstanceSpec instance - */ - CloudBigtableInstanceSpec.create = function create(properties) { - return new CloudBigtableInstanceSpec(properties); - }; - - /** - * Encodes the specified CloudBigtableInstanceSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec - * @static - * @param {google.cloud.datacatalog.v1.ICloudBigtableInstanceSpec} message CloudBigtableInstanceSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudBigtableInstanceSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cloudBigtableClusterSpecs != null && message.cloudBigtableClusterSpecs.length) - for (var i = 0; i < message.cloudBigtableClusterSpecs.length; ++i) - $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec.encode(message.cloudBigtableClusterSpecs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CloudBigtableInstanceSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec - * @static - * @param {google.cloud.datacatalog.v1.ICloudBigtableInstanceSpec} message CloudBigtableInstanceSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudBigtableInstanceSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudBigtableInstanceSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec - * @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.CloudBigtableInstanceSpec} CloudBigtableInstanceSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudBigtableInstanceSpec.decode = function decode(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.CloudBigtableInstanceSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.cloudBigtableClusterSpecs && message.cloudBigtableClusterSpecs.length)) - message.cloudBigtableClusterSpecs = []; - message.cloudBigtableClusterSpecs.push($root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudBigtableInstanceSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.CloudBigtableInstanceSpec} CloudBigtableInstanceSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudBigtableInstanceSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudBigtableInstanceSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudBigtableInstanceSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cloudBigtableClusterSpecs != null && message.hasOwnProperty("cloudBigtableClusterSpecs")) { - if (!Array.isArray(message.cloudBigtableClusterSpecs)) - return "cloudBigtableClusterSpecs: array expected"; - for (var i = 0; i < message.cloudBigtableClusterSpecs.length; ++i) { - var error = $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec.verify(message.cloudBigtableClusterSpecs[i]); - if (error) - return "cloudBigtableClusterSpecs." + error; - } - } - return null; - }; - - /** - * Creates a CloudBigtableInstanceSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.CloudBigtableInstanceSpec} CloudBigtableInstanceSpec - */ - CloudBigtableInstanceSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec(); - if (object.cloudBigtableClusterSpecs) { - if (!Array.isArray(object.cloudBigtableClusterSpecs)) - throw TypeError(".google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.cloudBigtableClusterSpecs: array expected"); - message.cloudBigtableClusterSpecs = []; - for (var i = 0; i < object.cloudBigtableClusterSpecs.length; ++i) { - if (typeof object.cloudBigtableClusterSpecs[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.cloudBigtableClusterSpecs: object expected"); - message.cloudBigtableClusterSpecs[i] = $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec.fromObject(object.cloudBigtableClusterSpecs[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a CloudBigtableInstanceSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec - * @static - * @param {google.cloud.datacatalog.v1.CloudBigtableInstanceSpec} message CloudBigtableInstanceSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudBigtableInstanceSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cloudBigtableClusterSpecs = []; - if (message.cloudBigtableClusterSpecs && message.cloudBigtableClusterSpecs.length) { - object.cloudBigtableClusterSpecs = []; - for (var j = 0; j < message.cloudBigtableClusterSpecs.length; ++j) - object.cloudBigtableClusterSpecs[j] = $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec.toObject(message.cloudBigtableClusterSpecs[j], options); - } - return object; - }; - - /** - * Converts this CloudBigtableInstanceSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec - * @instance - * @returns {Object.} JSON object - */ - CloudBigtableInstanceSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudBigtableInstanceSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudBigtableInstanceSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.CloudBigtableInstanceSpec"; - }; - - CloudBigtableInstanceSpec.CloudBigtableClusterSpec = (function() { - - /** - * Properties of a CloudBigtableClusterSpec. - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec - * @interface ICloudBigtableClusterSpec - * @property {string|null} [displayName] CloudBigtableClusterSpec displayName - * @property {string|null} [location] CloudBigtableClusterSpec location - * @property {string|null} [type] CloudBigtableClusterSpec type - * @property {string|null} [linkedResource] CloudBigtableClusterSpec linkedResource - */ - - /** - * Constructs a new CloudBigtableClusterSpec. - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec - * @classdesc Represents a CloudBigtableClusterSpec. - * @implements ICloudBigtableClusterSpec - * @constructor - * @param {google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.ICloudBigtableClusterSpec=} [properties] Properties to set - */ - function CloudBigtableClusterSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudBigtableClusterSpec displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec - * @instance - */ - CloudBigtableClusterSpec.prototype.displayName = ""; - - /** - * CloudBigtableClusterSpec location. - * @member {string} location - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec - * @instance - */ - CloudBigtableClusterSpec.prototype.location = ""; - - /** - * CloudBigtableClusterSpec type. - * @member {string} type - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec - * @instance - */ - CloudBigtableClusterSpec.prototype.type = ""; - - /** - * CloudBigtableClusterSpec linkedResource. - * @member {string} linkedResource - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec - * @instance - */ - CloudBigtableClusterSpec.prototype.linkedResource = ""; - - /** - * Creates a new CloudBigtableClusterSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec - * @static - * @param {google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.ICloudBigtableClusterSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec} CloudBigtableClusterSpec instance - */ - CloudBigtableClusterSpec.create = function create(properties) { - return new CloudBigtableClusterSpec(properties); - }; - - /** - * Encodes the specified CloudBigtableClusterSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec - * @static - * @param {google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.ICloudBigtableClusterSpec} message CloudBigtableClusterSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudBigtableClusterSpec.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.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.linkedResource != null && Object.hasOwnProperty.call(message, "linkedResource")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.linkedResource); - return writer; - }; - - /** - * Encodes the specified CloudBigtableClusterSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec - * @static - * @param {google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.ICloudBigtableClusterSpec} message CloudBigtableClusterSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudBigtableClusterSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudBigtableClusterSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec - * @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.CloudBigtableInstanceSpec.CloudBigtableClusterSpec} CloudBigtableClusterSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudBigtableClusterSpec.decode = function decode(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.CloudBigtableInstanceSpec.CloudBigtableClusterSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.location = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - case 4: { - message.linkedResource = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudBigtableClusterSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec} CloudBigtableClusterSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudBigtableClusterSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudBigtableClusterSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudBigtableClusterSpec.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.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) - if (!$util.isString(message.linkedResource)) - return "linkedResource: string expected"; - return null; - }; - - /** - * Creates a CloudBigtableClusterSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec} CloudBigtableClusterSpec - */ - CloudBigtableClusterSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.location != null) - message.location = String(object.location); - if (object.type != null) - message.type = String(object.type); - if (object.linkedResource != null) - message.linkedResource = String(object.linkedResource); - return message; - }; - - /** - * Creates a plain object from a CloudBigtableClusterSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec - * @static - * @param {google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec} message CloudBigtableClusterSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudBigtableClusterSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.location = ""; - object.type = ""; - object.linkedResource = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) - object.linkedResource = message.linkedResource; - return object; - }; - - /** - * Converts this CloudBigtableClusterSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec - * @instance - * @returns {Object.} JSON object - */ - CloudBigtableClusterSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudBigtableClusterSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudBigtableClusterSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec"; - }; - - return CloudBigtableClusterSpec; - })(); - - return CloudBigtableInstanceSpec; - })(); - - v1.ServiceSpec = (function() { - - /** - * Properties of a ServiceSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface IServiceSpec - * @property {google.cloud.datacatalog.v1.ICloudBigtableInstanceSpec|null} [cloudBigtableInstanceSpec] ServiceSpec cloudBigtableInstanceSpec - */ - - /** - * Constructs a new ServiceSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a ServiceSpec. - * @implements IServiceSpec - * @constructor - * @param {google.cloud.datacatalog.v1.IServiceSpec=} [properties] Properties to set - */ - function ServiceSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceSpec cloudBigtableInstanceSpec. - * @member {google.cloud.datacatalog.v1.ICloudBigtableInstanceSpec|null|undefined} cloudBigtableInstanceSpec - * @memberof google.cloud.datacatalog.v1.ServiceSpec - * @instance - */ - ServiceSpec.prototype.cloudBigtableInstanceSpec = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ServiceSpec systemSpec. - * @member {"cloudBigtableInstanceSpec"|undefined} systemSpec - * @memberof google.cloud.datacatalog.v1.ServiceSpec - * @instance - */ - Object.defineProperty(ServiceSpec.prototype, "systemSpec", { - get: $util.oneOfGetter($oneOfFields = ["cloudBigtableInstanceSpec"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ServiceSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ServiceSpec - * @static - * @param {google.cloud.datacatalog.v1.IServiceSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ServiceSpec} ServiceSpec instance - */ - ServiceSpec.create = function create(properties) { - return new ServiceSpec(properties); - }; - - /** - * Encodes the specified ServiceSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.ServiceSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ServiceSpec - * @static - * @param {google.cloud.datacatalog.v1.IServiceSpec} message ServiceSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cloudBigtableInstanceSpec != null && Object.hasOwnProperty.call(message, "cloudBigtableInstanceSpec")) - $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.encode(message.cloudBigtableInstanceSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ServiceSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ServiceSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ServiceSpec - * @static - * @param {google.cloud.datacatalog.v1.IServiceSpec} message ServiceSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ServiceSpec - * @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.ServiceSpec} ServiceSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceSpec.decode = function decode(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.ServiceSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.cloudBigtableInstanceSpec = $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ServiceSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ServiceSpec} ServiceSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ServiceSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.cloudBigtableInstanceSpec != null && message.hasOwnProperty("cloudBigtableInstanceSpec")) { - properties.systemSpec = 1; - { - var error = $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.verify(message.cloudBigtableInstanceSpec); - if (error) - return "cloudBigtableInstanceSpec." + error; - } - } - return null; - }; - - /** - * Creates a ServiceSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ServiceSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ServiceSpec} ServiceSpec - */ - ServiceSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ServiceSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.ServiceSpec(); - if (object.cloudBigtableInstanceSpec != null) { - if (typeof object.cloudBigtableInstanceSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1.ServiceSpec.cloudBigtableInstanceSpec: object expected"); - message.cloudBigtableInstanceSpec = $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.fromObject(object.cloudBigtableInstanceSpec); - } - return message; - }; - - /** - * Creates a plain object from a ServiceSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ServiceSpec - * @static - * @param {google.cloud.datacatalog.v1.ServiceSpec} message ServiceSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.cloudBigtableInstanceSpec != null && message.hasOwnProperty("cloudBigtableInstanceSpec")) { - object.cloudBigtableInstanceSpec = $root.google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.toObject(message.cloudBigtableInstanceSpec, options); - if (options.oneofs) - object.systemSpec = "cloudBigtableInstanceSpec"; - } - return object; - }; - - /** - * Converts this ServiceSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ServiceSpec - * @instance - * @returns {Object.} JSON object - */ - ServiceSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ServiceSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ServiceSpec"; - }; - - return ServiceSpec; - })(); - - v1.VertexModelSourceInfo = (function() { - - /** - * Properties of a VertexModelSourceInfo. - * @memberof google.cloud.datacatalog.v1 - * @interface IVertexModelSourceInfo - * @property {google.cloud.datacatalog.v1.VertexModelSourceInfo.ModelSourceType|null} [sourceType] VertexModelSourceInfo sourceType - * @property {boolean|null} [copy] VertexModelSourceInfo copy - */ - - /** - * Constructs a new VertexModelSourceInfo. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a VertexModelSourceInfo. - * @implements IVertexModelSourceInfo - * @constructor - * @param {google.cloud.datacatalog.v1.IVertexModelSourceInfo=} [properties] Properties to set - */ - function VertexModelSourceInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VertexModelSourceInfo sourceType. - * @member {google.cloud.datacatalog.v1.VertexModelSourceInfo.ModelSourceType} sourceType - * @memberof google.cloud.datacatalog.v1.VertexModelSourceInfo - * @instance - */ - VertexModelSourceInfo.prototype.sourceType = 0; - - /** - * VertexModelSourceInfo copy. - * @member {boolean} copy - * @memberof google.cloud.datacatalog.v1.VertexModelSourceInfo - * @instance - */ - VertexModelSourceInfo.prototype.copy = false; - - /** - * Creates a new VertexModelSourceInfo instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.VertexModelSourceInfo - * @static - * @param {google.cloud.datacatalog.v1.IVertexModelSourceInfo=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.VertexModelSourceInfo} VertexModelSourceInfo instance - */ - VertexModelSourceInfo.create = function create(properties) { - return new VertexModelSourceInfo(properties); - }; - - /** - * Encodes the specified VertexModelSourceInfo message. Does not implicitly {@link google.cloud.datacatalog.v1.VertexModelSourceInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.VertexModelSourceInfo - * @static - * @param {google.cloud.datacatalog.v1.IVertexModelSourceInfo} message VertexModelSourceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VertexModelSourceInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sourceType); - if (message.copy != null && Object.hasOwnProperty.call(message, "copy")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.copy); - return writer; - }; - - /** - * Encodes the specified VertexModelSourceInfo message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.VertexModelSourceInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.VertexModelSourceInfo - * @static - * @param {google.cloud.datacatalog.v1.IVertexModelSourceInfo} message VertexModelSourceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VertexModelSourceInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VertexModelSourceInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.VertexModelSourceInfo - * @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.VertexModelSourceInfo} VertexModelSourceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VertexModelSourceInfo.decode = function decode(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.VertexModelSourceInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.sourceType = reader.int32(); - break; - } - case 2: { - message.copy = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VertexModelSourceInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.VertexModelSourceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.VertexModelSourceInfo} VertexModelSourceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VertexModelSourceInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VertexModelSourceInfo message. - * @function verify - * @memberof google.cloud.datacatalog.v1.VertexModelSourceInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VertexModelSourceInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sourceType != null && message.hasOwnProperty("sourceType")) - switch (message.sourceType) { - default: - return "sourceType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.copy != null && message.hasOwnProperty("copy")) - if (typeof message.copy !== "boolean") - return "copy: boolean expected"; - return null; - }; - - /** - * Creates a VertexModelSourceInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.VertexModelSourceInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.VertexModelSourceInfo} VertexModelSourceInfo - */ - VertexModelSourceInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.VertexModelSourceInfo) - return object; - var message = new $root.google.cloud.datacatalog.v1.VertexModelSourceInfo(); - switch (object.sourceType) { - default: - if (typeof object.sourceType === "number") { - message.sourceType = object.sourceType; - break; - } - break; - case "MODEL_SOURCE_TYPE_UNSPECIFIED": - case 0: - message.sourceType = 0; - break; - case "AUTOML": - case 1: - message.sourceType = 1; - break; - case "CUSTOM": - case 2: - message.sourceType = 2; - break; - case "BQML": - case 3: - message.sourceType = 3; - break; - case "MODEL_GARDEN": - case 4: - message.sourceType = 4; - break; - case "GENIE": - case 5: - message.sourceType = 5; - break; - case "CUSTOM_TEXT_EMBEDDING": - case 6: - message.sourceType = 6; - break; - case "MARKETPLACE": - case 7: - message.sourceType = 7; - break; - } - if (object.copy != null) - message.copy = Boolean(object.copy); - return message; - }; - - /** - * Creates a plain object from a VertexModelSourceInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.VertexModelSourceInfo - * @static - * @param {google.cloud.datacatalog.v1.VertexModelSourceInfo} message VertexModelSourceInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VertexModelSourceInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sourceType = options.enums === String ? "MODEL_SOURCE_TYPE_UNSPECIFIED" : 0; - object.copy = false; - } - if (message.sourceType != null && message.hasOwnProperty("sourceType")) - object.sourceType = options.enums === String ? $root.google.cloud.datacatalog.v1.VertexModelSourceInfo.ModelSourceType[message.sourceType] === undefined ? message.sourceType : $root.google.cloud.datacatalog.v1.VertexModelSourceInfo.ModelSourceType[message.sourceType] : message.sourceType; - if (message.copy != null && message.hasOwnProperty("copy")) - object.copy = message.copy; - return object; - }; - - /** - * Converts this VertexModelSourceInfo to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.VertexModelSourceInfo - * @instance - * @returns {Object.} JSON object - */ - VertexModelSourceInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VertexModelSourceInfo - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.VertexModelSourceInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VertexModelSourceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.VertexModelSourceInfo"; - }; - - /** - * ModelSourceType enum. - * @name google.cloud.datacatalog.v1.VertexModelSourceInfo.ModelSourceType - * @enum {number} - * @property {number} MODEL_SOURCE_TYPE_UNSPECIFIED=0 MODEL_SOURCE_TYPE_UNSPECIFIED value - * @property {number} AUTOML=1 AUTOML value - * @property {number} CUSTOM=2 CUSTOM value - * @property {number} BQML=3 BQML value - * @property {number} MODEL_GARDEN=4 MODEL_GARDEN value - * @property {number} GENIE=5 GENIE value - * @property {number} CUSTOM_TEXT_EMBEDDING=6 CUSTOM_TEXT_EMBEDDING value - * @property {number} MARKETPLACE=7 MARKETPLACE value - */ - VertexModelSourceInfo.ModelSourceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODEL_SOURCE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "AUTOML"] = 1; - values[valuesById[2] = "CUSTOM"] = 2; - values[valuesById[3] = "BQML"] = 3; - values[valuesById[4] = "MODEL_GARDEN"] = 4; - values[valuesById[5] = "GENIE"] = 5; - values[valuesById[6] = "CUSTOM_TEXT_EMBEDDING"] = 6; - values[valuesById[7] = "MARKETPLACE"] = 7; - return values; - })(); - - return VertexModelSourceInfo; - })(); - - v1.VertexModelSpec = (function() { - - /** - * Properties of a VertexModelSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface IVertexModelSpec - * @property {string|null} [versionId] VertexModelSpec versionId - * @property {Array.|null} [versionAliases] VertexModelSpec versionAliases - * @property {string|null} [versionDescription] VertexModelSpec versionDescription - * @property {google.cloud.datacatalog.v1.IVertexModelSourceInfo|null} [vertexModelSourceInfo] VertexModelSpec vertexModelSourceInfo - * @property {string|null} [containerImageUri] VertexModelSpec containerImageUri - */ - - /** - * Constructs a new VertexModelSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a VertexModelSpec. - * @implements IVertexModelSpec - * @constructor - * @param {google.cloud.datacatalog.v1.IVertexModelSpec=} [properties] Properties to set - */ - function VertexModelSpec(properties) { - this.versionAliases = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VertexModelSpec versionId. - * @member {string} versionId - * @memberof google.cloud.datacatalog.v1.VertexModelSpec - * @instance - */ - VertexModelSpec.prototype.versionId = ""; - - /** - * VertexModelSpec versionAliases. - * @member {Array.} versionAliases - * @memberof google.cloud.datacatalog.v1.VertexModelSpec - * @instance - */ - VertexModelSpec.prototype.versionAliases = $util.emptyArray; - - /** - * VertexModelSpec versionDescription. - * @member {string} versionDescription - * @memberof google.cloud.datacatalog.v1.VertexModelSpec - * @instance - */ - VertexModelSpec.prototype.versionDescription = ""; - - /** - * VertexModelSpec vertexModelSourceInfo. - * @member {google.cloud.datacatalog.v1.IVertexModelSourceInfo|null|undefined} vertexModelSourceInfo - * @memberof google.cloud.datacatalog.v1.VertexModelSpec - * @instance - */ - VertexModelSpec.prototype.vertexModelSourceInfo = null; - - /** - * VertexModelSpec containerImageUri. - * @member {string} containerImageUri - * @memberof google.cloud.datacatalog.v1.VertexModelSpec - * @instance - */ - VertexModelSpec.prototype.containerImageUri = ""; - - /** - * Creates a new VertexModelSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.VertexModelSpec - * @static - * @param {google.cloud.datacatalog.v1.IVertexModelSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.VertexModelSpec} VertexModelSpec instance - */ - VertexModelSpec.create = function create(properties) { - return new VertexModelSpec(properties); - }; - - /** - * Encodes the specified VertexModelSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.VertexModelSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.VertexModelSpec - * @static - * @param {google.cloud.datacatalog.v1.IVertexModelSpec} message VertexModelSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VertexModelSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.versionId != null && Object.hasOwnProperty.call(message, "versionId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.versionId); - if (message.versionAliases != null && message.versionAliases.length) - for (var i = 0; i < message.versionAliases.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.versionAliases[i]); - if (message.versionDescription != null && Object.hasOwnProperty.call(message, "versionDescription")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.versionDescription); - if (message.vertexModelSourceInfo != null && Object.hasOwnProperty.call(message, "vertexModelSourceInfo")) - $root.google.cloud.datacatalog.v1.VertexModelSourceInfo.encode(message.vertexModelSourceInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.containerImageUri != null && Object.hasOwnProperty.call(message, "containerImageUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.containerImageUri); - return writer; - }; - - /** - * Encodes the specified VertexModelSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.VertexModelSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.VertexModelSpec - * @static - * @param {google.cloud.datacatalog.v1.IVertexModelSpec} message VertexModelSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VertexModelSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VertexModelSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.VertexModelSpec - * @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.VertexModelSpec} VertexModelSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VertexModelSpec.decode = function decode(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.VertexModelSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.versionId = reader.string(); - break; - } - case 2: { - if (!(message.versionAliases && message.versionAliases.length)) - message.versionAliases = []; - message.versionAliases.push(reader.string()); - break; - } - case 3: { - message.versionDescription = reader.string(); - break; - } - case 4: { - message.vertexModelSourceInfo = $root.google.cloud.datacatalog.v1.VertexModelSourceInfo.decode(reader, reader.uint32()); - break; - } - case 5: { - message.containerImageUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VertexModelSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.VertexModelSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.VertexModelSpec} VertexModelSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VertexModelSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VertexModelSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.VertexModelSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VertexModelSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.versionId != null && message.hasOwnProperty("versionId")) - if (!$util.isString(message.versionId)) - return "versionId: string expected"; - if (message.versionAliases != null && message.hasOwnProperty("versionAliases")) { - if (!Array.isArray(message.versionAliases)) - return "versionAliases: array expected"; - for (var i = 0; i < message.versionAliases.length; ++i) - if (!$util.isString(message.versionAliases[i])) - return "versionAliases: string[] expected"; - } - if (message.versionDescription != null && message.hasOwnProperty("versionDescription")) - if (!$util.isString(message.versionDescription)) - return "versionDescription: string expected"; - if (message.vertexModelSourceInfo != null && message.hasOwnProperty("vertexModelSourceInfo")) { - var error = $root.google.cloud.datacatalog.v1.VertexModelSourceInfo.verify(message.vertexModelSourceInfo); - if (error) - return "vertexModelSourceInfo." + error; - } - if (message.containerImageUri != null && message.hasOwnProperty("containerImageUri")) - if (!$util.isString(message.containerImageUri)) - return "containerImageUri: string expected"; - return null; - }; - - /** - * Creates a VertexModelSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.VertexModelSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.VertexModelSpec} VertexModelSpec - */ - VertexModelSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.VertexModelSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.VertexModelSpec(); - if (object.versionId != null) - message.versionId = String(object.versionId); - if (object.versionAliases) { - if (!Array.isArray(object.versionAliases)) - throw TypeError(".google.cloud.datacatalog.v1.VertexModelSpec.versionAliases: array expected"); - message.versionAliases = []; - for (var i = 0; i < object.versionAliases.length; ++i) - message.versionAliases[i] = String(object.versionAliases[i]); - } - if (object.versionDescription != null) - message.versionDescription = String(object.versionDescription); - if (object.vertexModelSourceInfo != null) { - if (typeof object.vertexModelSourceInfo !== "object") - throw TypeError(".google.cloud.datacatalog.v1.VertexModelSpec.vertexModelSourceInfo: object expected"); - message.vertexModelSourceInfo = $root.google.cloud.datacatalog.v1.VertexModelSourceInfo.fromObject(object.vertexModelSourceInfo); - } - if (object.containerImageUri != null) - message.containerImageUri = String(object.containerImageUri); - return message; - }; - - /** - * Creates a plain object from a VertexModelSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.VertexModelSpec - * @static - * @param {google.cloud.datacatalog.v1.VertexModelSpec} message VertexModelSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VertexModelSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.versionAliases = []; - if (options.defaults) { - object.versionId = ""; - object.versionDescription = ""; - object.vertexModelSourceInfo = null; - object.containerImageUri = ""; - } - if (message.versionId != null && message.hasOwnProperty("versionId")) - object.versionId = message.versionId; - if (message.versionAliases && message.versionAliases.length) { - object.versionAliases = []; - for (var j = 0; j < message.versionAliases.length; ++j) - object.versionAliases[j] = message.versionAliases[j]; - } - if (message.versionDescription != null && message.hasOwnProperty("versionDescription")) - object.versionDescription = message.versionDescription; - if (message.vertexModelSourceInfo != null && message.hasOwnProperty("vertexModelSourceInfo")) - object.vertexModelSourceInfo = $root.google.cloud.datacatalog.v1.VertexModelSourceInfo.toObject(message.vertexModelSourceInfo, options); - if (message.containerImageUri != null && message.hasOwnProperty("containerImageUri")) - object.containerImageUri = message.containerImageUri; - return object; - }; - - /** - * Converts this VertexModelSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.VertexModelSpec - * @instance - * @returns {Object.} JSON object - */ - VertexModelSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VertexModelSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.VertexModelSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VertexModelSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.VertexModelSpec"; - }; - - return VertexModelSpec; - })(); - - v1.VertexDatasetSpec = (function() { - - /** - * Properties of a VertexDatasetSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface IVertexDatasetSpec - * @property {number|Long|null} [dataItemCount] VertexDatasetSpec dataItemCount - * @property {google.cloud.datacatalog.v1.VertexDatasetSpec.DataType|null} [dataType] VertexDatasetSpec dataType - */ - - /** - * Constructs a new VertexDatasetSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a VertexDatasetSpec. - * @implements IVertexDatasetSpec - * @constructor - * @param {google.cloud.datacatalog.v1.IVertexDatasetSpec=} [properties] Properties to set - */ - function VertexDatasetSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VertexDatasetSpec dataItemCount. - * @member {number|Long} dataItemCount - * @memberof google.cloud.datacatalog.v1.VertexDatasetSpec - * @instance - */ - VertexDatasetSpec.prototype.dataItemCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * VertexDatasetSpec dataType. - * @member {google.cloud.datacatalog.v1.VertexDatasetSpec.DataType} dataType - * @memberof google.cloud.datacatalog.v1.VertexDatasetSpec - * @instance - */ - VertexDatasetSpec.prototype.dataType = 0; - - /** - * Creates a new VertexDatasetSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.VertexDatasetSpec - * @static - * @param {google.cloud.datacatalog.v1.IVertexDatasetSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.VertexDatasetSpec} VertexDatasetSpec instance - */ - VertexDatasetSpec.create = function create(properties) { - return new VertexDatasetSpec(properties); - }; - - /** - * Encodes the specified VertexDatasetSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.VertexDatasetSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.VertexDatasetSpec - * @static - * @param {google.cloud.datacatalog.v1.IVertexDatasetSpec} message VertexDatasetSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VertexDatasetSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataItemCount != null && Object.hasOwnProperty.call(message, "dataItemCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.dataItemCount); - if (message.dataType != null && Object.hasOwnProperty.call(message, "dataType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dataType); - return writer; - }; - - /** - * Encodes the specified VertexDatasetSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.VertexDatasetSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.VertexDatasetSpec - * @static - * @param {google.cloud.datacatalog.v1.IVertexDatasetSpec} message VertexDatasetSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VertexDatasetSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VertexDatasetSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.VertexDatasetSpec - * @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.VertexDatasetSpec} VertexDatasetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VertexDatasetSpec.decode = function decode(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.VertexDatasetSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.dataItemCount = reader.int64(); - break; - } - case 2: { - message.dataType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VertexDatasetSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.VertexDatasetSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.VertexDatasetSpec} VertexDatasetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VertexDatasetSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VertexDatasetSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.VertexDatasetSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VertexDatasetSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataItemCount != null && message.hasOwnProperty("dataItemCount")) - if (!$util.isInteger(message.dataItemCount) && !(message.dataItemCount && $util.isInteger(message.dataItemCount.low) && $util.isInteger(message.dataItemCount.high))) - return "dataItemCount: integer|Long expected"; - if (message.dataType != null && message.hasOwnProperty("dataType")) - switch (message.dataType) { - default: - return "dataType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - break; - } - return null; - }; - - /** - * Creates a VertexDatasetSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.VertexDatasetSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.VertexDatasetSpec} VertexDatasetSpec - */ - VertexDatasetSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.VertexDatasetSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.VertexDatasetSpec(); - if (object.dataItemCount != null) - if ($util.Long) - (message.dataItemCount = $util.Long.fromValue(object.dataItemCount)).unsigned = false; - else if (typeof object.dataItemCount === "string") - message.dataItemCount = parseInt(object.dataItemCount, 10); - else if (typeof object.dataItemCount === "number") - message.dataItemCount = object.dataItemCount; - else if (typeof object.dataItemCount === "object") - message.dataItemCount = new $util.LongBits(object.dataItemCount.low >>> 0, object.dataItemCount.high >>> 0).toNumber(); - switch (object.dataType) { - default: - if (typeof object.dataType === "number") { - message.dataType = object.dataType; - break; - } - break; - case "DATA_TYPE_UNSPECIFIED": - case 0: - message.dataType = 0; - break; - case "TABLE": - case 1: - message.dataType = 1; - break; - case "IMAGE": - case 2: - message.dataType = 2; - break; - case "TEXT": - case 3: - message.dataType = 3; - break; - case "VIDEO": - case 4: - message.dataType = 4; - break; - case "CONVERSATION": - case 5: - message.dataType = 5; - break; - case "TIME_SERIES": - case 6: - message.dataType = 6; - break; - case "DOCUMENT": - case 7: - message.dataType = 7; - break; - case "TEXT_TO_SPEECH": - case 8: - message.dataType = 8; - break; - case "TRANSLATION": - case 9: - message.dataType = 9; - break; - case "STORE_VISION": - case 10: - message.dataType = 10; - break; - case "ENTERPRISE_KNOWLEDGE_GRAPH": - case 11: - message.dataType = 11; - break; - case "TEXT_PROMPT": - case 12: - message.dataType = 12; - break; - } - return message; - }; - - /** - * Creates a plain object from a VertexDatasetSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.VertexDatasetSpec - * @static - * @param {google.cloud.datacatalog.v1.VertexDatasetSpec} message VertexDatasetSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VertexDatasetSpec.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.dataItemCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.dataItemCount = options.longs === String ? "0" : 0; - object.dataType = options.enums === String ? "DATA_TYPE_UNSPECIFIED" : 0; - } - if (message.dataItemCount != null && message.hasOwnProperty("dataItemCount")) - if (typeof message.dataItemCount === "number") - object.dataItemCount = options.longs === String ? String(message.dataItemCount) : message.dataItemCount; - else - object.dataItemCount = options.longs === String ? $util.Long.prototype.toString.call(message.dataItemCount) : options.longs === Number ? new $util.LongBits(message.dataItemCount.low >>> 0, message.dataItemCount.high >>> 0).toNumber() : message.dataItemCount; - if (message.dataType != null && message.hasOwnProperty("dataType")) - object.dataType = options.enums === String ? $root.google.cloud.datacatalog.v1.VertexDatasetSpec.DataType[message.dataType] === undefined ? message.dataType : $root.google.cloud.datacatalog.v1.VertexDatasetSpec.DataType[message.dataType] : message.dataType; - return object; - }; - - /** - * Converts this VertexDatasetSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.VertexDatasetSpec - * @instance - * @returns {Object.} JSON object - */ - VertexDatasetSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VertexDatasetSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.VertexDatasetSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VertexDatasetSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.VertexDatasetSpec"; - }; - - /** - * DataType enum. - * @name google.cloud.datacatalog.v1.VertexDatasetSpec.DataType - * @enum {number} - * @property {number} DATA_TYPE_UNSPECIFIED=0 DATA_TYPE_UNSPECIFIED value - * @property {number} TABLE=1 TABLE value - * @property {number} IMAGE=2 IMAGE value - * @property {number} TEXT=3 TEXT value - * @property {number} VIDEO=4 VIDEO value - * @property {number} CONVERSATION=5 CONVERSATION value - * @property {number} TIME_SERIES=6 TIME_SERIES value - * @property {number} DOCUMENT=7 DOCUMENT value - * @property {number} TEXT_TO_SPEECH=8 TEXT_TO_SPEECH value - * @property {number} TRANSLATION=9 TRANSLATION value - * @property {number} STORE_VISION=10 STORE_VISION value - * @property {number} ENTERPRISE_KNOWLEDGE_GRAPH=11 ENTERPRISE_KNOWLEDGE_GRAPH value - * @property {number} TEXT_PROMPT=12 TEXT_PROMPT value - */ - VertexDatasetSpec.DataType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATA_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TABLE"] = 1; - values[valuesById[2] = "IMAGE"] = 2; - values[valuesById[3] = "TEXT"] = 3; - values[valuesById[4] = "VIDEO"] = 4; - values[valuesById[5] = "CONVERSATION"] = 5; - values[valuesById[6] = "TIME_SERIES"] = 6; - values[valuesById[7] = "DOCUMENT"] = 7; - values[valuesById[8] = "TEXT_TO_SPEECH"] = 8; - values[valuesById[9] = "TRANSLATION"] = 9; - values[valuesById[10] = "STORE_VISION"] = 10; - values[valuesById[11] = "ENTERPRISE_KNOWLEDGE_GRAPH"] = 11; - values[valuesById[12] = "TEXT_PROMPT"] = 12; - return values; - })(); - - return VertexDatasetSpec; - })(); - - v1.ModelSpec = (function() { - - /** - * Properties of a ModelSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface IModelSpec - * @property {google.cloud.datacatalog.v1.IVertexModelSpec|null} [vertexModelSpec] ModelSpec vertexModelSpec - */ - - /** - * Constructs a new ModelSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a ModelSpec. - * @implements IModelSpec - * @constructor - * @param {google.cloud.datacatalog.v1.IModelSpec=} [properties] Properties to set - */ - function ModelSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ModelSpec vertexModelSpec. - * @member {google.cloud.datacatalog.v1.IVertexModelSpec|null|undefined} vertexModelSpec - * @memberof google.cloud.datacatalog.v1.ModelSpec - * @instance - */ - ModelSpec.prototype.vertexModelSpec = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ModelSpec systemSpec. - * @member {"vertexModelSpec"|undefined} systemSpec - * @memberof google.cloud.datacatalog.v1.ModelSpec - * @instance - */ - Object.defineProperty(ModelSpec.prototype, "systemSpec", { - get: $util.oneOfGetter($oneOfFields = ["vertexModelSpec"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ModelSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ModelSpec - * @static - * @param {google.cloud.datacatalog.v1.IModelSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ModelSpec} ModelSpec instance - */ - ModelSpec.create = function create(properties) { - return new ModelSpec(properties); - }; - - /** - * Encodes the specified ModelSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.ModelSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ModelSpec - * @static - * @param {google.cloud.datacatalog.v1.IModelSpec} message ModelSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModelSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.vertexModelSpec != null && Object.hasOwnProperty.call(message, "vertexModelSpec")) - $root.google.cloud.datacatalog.v1.VertexModelSpec.encode(message.vertexModelSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ModelSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ModelSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ModelSpec - * @static - * @param {google.cloud.datacatalog.v1.IModelSpec} message ModelSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModelSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ModelSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ModelSpec - * @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.ModelSpec} ModelSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModelSpec.decode = function decode(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.ModelSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.vertexModelSpec = $root.google.cloud.datacatalog.v1.VertexModelSpec.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ModelSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ModelSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ModelSpec} ModelSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModelSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ModelSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ModelSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ModelSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.vertexModelSpec != null && message.hasOwnProperty("vertexModelSpec")) { - properties.systemSpec = 1; - { - var error = $root.google.cloud.datacatalog.v1.VertexModelSpec.verify(message.vertexModelSpec); - if (error) - return "vertexModelSpec." + error; - } - } - return null; - }; - - /** - * Creates a ModelSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ModelSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ModelSpec} ModelSpec - */ - ModelSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ModelSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.ModelSpec(); - if (object.vertexModelSpec != null) { - if (typeof object.vertexModelSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1.ModelSpec.vertexModelSpec: object expected"); - message.vertexModelSpec = $root.google.cloud.datacatalog.v1.VertexModelSpec.fromObject(object.vertexModelSpec); - } - return message; - }; - - /** - * Creates a plain object from a ModelSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ModelSpec - * @static - * @param {google.cloud.datacatalog.v1.ModelSpec} message ModelSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ModelSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.vertexModelSpec != null && message.hasOwnProperty("vertexModelSpec")) { - object.vertexModelSpec = $root.google.cloud.datacatalog.v1.VertexModelSpec.toObject(message.vertexModelSpec, options); - if (options.oneofs) - object.systemSpec = "vertexModelSpec"; - } - return object; - }; - - /** - * Converts this ModelSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ModelSpec - * @instance - * @returns {Object.} JSON object - */ - ModelSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ModelSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ModelSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ModelSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ModelSpec"; - }; - - return ModelSpec; - })(); - - v1.FeatureOnlineStoreSpec = (function() { - - /** - * Properties of a FeatureOnlineStoreSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface IFeatureOnlineStoreSpec - * @property {google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.StorageType|null} [storageType] FeatureOnlineStoreSpec storageType - */ - - /** - * Constructs a new FeatureOnlineStoreSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a FeatureOnlineStoreSpec. - * @implements IFeatureOnlineStoreSpec - * @constructor - * @param {google.cloud.datacatalog.v1.IFeatureOnlineStoreSpec=} [properties] Properties to set - */ - function FeatureOnlineStoreSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureOnlineStoreSpec storageType. - * @member {google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.StorageType} storageType - * @memberof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec - * @instance - */ - FeatureOnlineStoreSpec.prototype.storageType = 0; - - /** - * Creates a new FeatureOnlineStoreSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec - * @static - * @param {google.cloud.datacatalog.v1.IFeatureOnlineStoreSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.FeatureOnlineStoreSpec} FeatureOnlineStoreSpec instance - */ - FeatureOnlineStoreSpec.create = function create(properties) { - return new FeatureOnlineStoreSpec(properties); - }; - - /** - * Encodes the specified FeatureOnlineStoreSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec - * @static - * @param {google.cloud.datacatalog.v1.IFeatureOnlineStoreSpec} message FeatureOnlineStoreSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureOnlineStoreSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.storageType != null && Object.hasOwnProperty.call(message, "storageType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.storageType); - return writer; - }; - - /** - * Encodes the specified FeatureOnlineStoreSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec - * @static - * @param {google.cloud.datacatalog.v1.IFeatureOnlineStoreSpec} message FeatureOnlineStoreSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureOnlineStoreSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureOnlineStoreSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec - * @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.FeatureOnlineStoreSpec} FeatureOnlineStoreSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureOnlineStoreSpec.decode = function decode(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.FeatureOnlineStoreSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.storageType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureOnlineStoreSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.FeatureOnlineStoreSpec} FeatureOnlineStoreSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureOnlineStoreSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureOnlineStoreSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureOnlineStoreSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.storageType != null && message.hasOwnProperty("storageType")) - switch (message.storageType) { - default: - return "storageType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a FeatureOnlineStoreSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.FeatureOnlineStoreSpec} FeatureOnlineStoreSpec - */ - FeatureOnlineStoreSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.FeatureOnlineStoreSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.FeatureOnlineStoreSpec(); - switch (object.storageType) { - default: - if (typeof object.storageType === "number") { - message.storageType = object.storageType; - break; - } - break; - case "STORAGE_TYPE_UNSPECIFIED": - case 0: - message.storageType = 0; - break; - case "BIGTABLE": - case 1: - message.storageType = 1; - break; - case "OPTIMIZED": - case 2: - message.storageType = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureOnlineStoreSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec - * @static - * @param {google.cloud.datacatalog.v1.FeatureOnlineStoreSpec} message FeatureOnlineStoreSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureOnlineStoreSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.storageType = options.enums === String ? "STORAGE_TYPE_UNSPECIFIED" : 0; - if (message.storageType != null && message.hasOwnProperty("storageType")) - object.storageType = options.enums === String ? $root.google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.StorageType[message.storageType] === undefined ? message.storageType : $root.google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.StorageType[message.storageType] : message.storageType; - return object; - }; - - /** - * Converts this FeatureOnlineStoreSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec - * @instance - * @returns {Object.} JSON object - */ - FeatureOnlineStoreSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureOnlineStoreSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.FeatureOnlineStoreSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureOnlineStoreSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.FeatureOnlineStoreSpec"; - }; - - /** - * StorageType enum. - * @name google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.StorageType - * @enum {number} - * @property {number} STORAGE_TYPE_UNSPECIFIED=0 STORAGE_TYPE_UNSPECIFIED value - * @property {number} BIGTABLE=1 BIGTABLE value - * @property {number} OPTIMIZED=2 OPTIMIZED value - */ - FeatureOnlineStoreSpec.StorageType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STORAGE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "BIGTABLE"] = 1; - values[valuesById[2] = "OPTIMIZED"] = 2; - return values; - })(); - - return FeatureOnlineStoreSpec; - })(); - - 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 - * @property {boolean|null} [transferredToDataplex] EntryGroup transferredToDataplex - */ - - /** - * 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; - - /** - * EntryGroup transferredToDataplex. - * @member {boolean} transferredToDataplex - * @memberof google.cloud.datacatalog.v1.EntryGroup - * @instance - */ - EntryGroup.prototype.transferredToDataplex = false; - - /** - * 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(); - if (message.transferredToDataplex != null && Object.hasOwnProperty.call(message, "transferredToDataplex")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.transferredToDataplex); - 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; - } - case 9: { - message.transferredToDataplex = reader.bool(); - 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; - } - if (message.transferredToDataplex != null && message.hasOwnProperty("transferredToDataplex")) - if (typeof message.transferredToDataplex !== "boolean") - return "transferredToDataplex: boolean expected"; - 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); - } - if (object.transferredToDataplex != null) - message.transferredToDataplex = Boolean(object.transferredToDataplex); - 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; - object.transferredToDataplex = false; - } - 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); - if (message.transferredToDataplex != null && message.hasOwnProperty("transferredToDataplex")) - object.transferredToDataplex = message.transferredToDataplex; - 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.ReconcileTagsRequest = (function() { - - /** - * Properties of a ReconcileTagsRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IReconcileTagsRequest - * @property {string|null} [parent] ReconcileTagsRequest parent - * @property {string|null} [tagTemplate] ReconcileTagsRequest tagTemplate - * @property {boolean|null} [forceDeleteMissing] ReconcileTagsRequest forceDeleteMissing - * @property {Array.|null} [tags] ReconcileTagsRequest tags - */ - - /** - * Constructs a new ReconcileTagsRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a ReconcileTagsRequest. - * @implements IReconcileTagsRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IReconcileTagsRequest=} [properties] Properties to set - */ - function ReconcileTagsRequest(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]]; - } - - /** - * ReconcileTagsRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest - * @instance - */ - ReconcileTagsRequest.prototype.parent = ""; - - /** - * ReconcileTagsRequest tagTemplate. - * @member {string} tagTemplate - * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest - * @instance - */ - ReconcileTagsRequest.prototype.tagTemplate = ""; - - /** - * ReconcileTagsRequest forceDeleteMissing. - * @member {boolean} forceDeleteMissing - * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest - * @instance - */ - ReconcileTagsRequest.prototype.forceDeleteMissing = false; - - /** - * ReconcileTagsRequest tags. - * @member {Array.} tags - * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest - * @instance - */ - ReconcileTagsRequest.prototype.tags = $util.emptyArray; - - /** - * Creates a new ReconcileTagsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest - * @static - * @param {google.cloud.datacatalog.v1.IReconcileTagsRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ReconcileTagsRequest} ReconcileTagsRequest instance - */ - ReconcileTagsRequest.create = function create(properties) { - return new ReconcileTagsRequest(properties); - }; - - /** - * Encodes the specified ReconcileTagsRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ReconcileTagsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest - * @static - * @param {google.cloud.datacatalog.v1.IReconcileTagsRequest} message ReconcileTagsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReconcileTagsRequest.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")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.tagTemplate); - if (message.forceDeleteMissing != null && Object.hasOwnProperty.call(message, "forceDeleteMissing")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.forceDeleteMissing); - 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 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ReconcileTagsRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ReconcileTagsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest - * @static - * @param {google.cloud.datacatalog.v1.IReconcileTagsRequest} message ReconcileTagsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReconcileTagsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReconcileTagsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest - * @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.ReconcileTagsRequest} ReconcileTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReconcileTagsRequest.decode = function decode(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.ReconcileTagsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.tagTemplate = reader.string(); - break; - } - case 3: { - message.forceDeleteMissing = reader.bool(); - break; - } - case 4: { - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push($root.google.cloud.datacatalog.v1.Tag.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReconcileTagsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ReconcileTagsRequest} ReconcileTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReconcileTagsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReconcileTagsRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReconcileTagsRequest.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.tagTemplate != null && message.hasOwnProperty("tagTemplate")) - if (!$util.isString(message.tagTemplate)) - return "tagTemplate: string expected"; - if (message.forceDeleteMissing != null && message.hasOwnProperty("forceDeleteMissing")) - if (typeof message.forceDeleteMissing !== "boolean") - return "forceDeleteMissing: boolean 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; - } - } - return null; - }; - - /** - * Creates a ReconcileTagsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ReconcileTagsRequest} ReconcileTagsRequest - */ - ReconcileTagsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ReconcileTagsRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.ReconcileTagsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.tagTemplate != null) - message.tagTemplate = String(object.tagTemplate); - if (object.forceDeleteMissing != null) - message.forceDeleteMissing = Boolean(object.forceDeleteMissing); - if (object.tags) { - if (!Array.isArray(object.tags)) - throw TypeError(".google.cloud.datacatalog.v1.ReconcileTagsRequest.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.ReconcileTagsRequest.tags: object expected"); - message.tags[i] = $root.google.cloud.datacatalog.v1.Tag.fromObject(object.tags[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ReconcileTagsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest - * @static - * @param {google.cloud.datacatalog.v1.ReconcileTagsRequest} message ReconcileTagsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReconcileTagsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.tags = []; - if (options.defaults) { - object.parent = ""; - object.tagTemplate = ""; - object.forceDeleteMissing = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.tagTemplate != null && message.hasOwnProperty("tagTemplate")) - object.tagTemplate = message.tagTemplate; - if (message.forceDeleteMissing != null && message.hasOwnProperty("forceDeleteMissing")) - object.forceDeleteMissing = message.forceDeleteMissing; - 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); - } - return object; - }; - - /** - * Converts this ReconcileTagsRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest - * @instance - * @returns {Object.} JSON object - */ - ReconcileTagsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReconcileTagsRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ReconcileTagsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReconcileTagsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ReconcileTagsRequest"; - }; - - return ReconcileTagsRequest; - })(); - - v1.ReconcileTagsResponse = (function() { - - /** - * Properties of a ReconcileTagsResponse. - * @memberof google.cloud.datacatalog.v1 - * @interface IReconcileTagsResponse - * @property {number|Long|null} [createdTagsCount] ReconcileTagsResponse createdTagsCount - * @property {number|Long|null} [updatedTagsCount] ReconcileTagsResponse updatedTagsCount - * @property {number|Long|null} [deletedTagsCount] ReconcileTagsResponse deletedTagsCount - */ - - /** - * Constructs a new ReconcileTagsResponse. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a ReconcileTagsResponse. - * @implements IReconcileTagsResponse - * @constructor - * @param {google.cloud.datacatalog.v1.IReconcileTagsResponse=} [properties] Properties to set - */ - function ReconcileTagsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReconcileTagsResponse createdTagsCount. - * @member {number|Long} createdTagsCount - * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse - * @instance - */ - ReconcileTagsResponse.prototype.createdTagsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ReconcileTagsResponse updatedTagsCount. - * @member {number|Long} updatedTagsCount - * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse - * @instance - */ - ReconcileTagsResponse.prototype.updatedTagsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ReconcileTagsResponse deletedTagsCount. - * @member {number|Long} deletedTagsCount - * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse - * @instance - */ - ReconcileTagsResponse.prototype.deletedTagsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new ReconcileTagsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse - * @static - * @param {google.cloud.datacatalog.v1.IReconcileTagsResponse=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ReconcileTagsResponse} ReconcileTagsResponse instance - */ - ReconcileTagsResponse.create = function create(properties) { - return new ReconcileTagsResponse(properties); - }; - - /** - * Encodes the specified ReconcileTagsResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.ReconcileTagsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse - * @static - * @param {google.cloud.datacatalog.v1.IReconcileTagsResponse} message ReconcileTagsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReconcileTagsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.createdTagsCount != null && Object.hasOwnProperty.call(message, "createdTagsCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.createdTagsCount); - if (message.updatedTagsCount != null && Object.hasOwnProperty.call(message, "updatedTagsCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.updatedTagsCount); - if (message.deletedTagsCount != null && Object.hasOwnProperty.call(message, "deletedTagsCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.deletedTagsCount); - return writer; - }; - - /** - * Encodes the specified ReconcileTagsResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ReconcileTagsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse - * @static - * @param {google.cloud.datacatalog.v1.IReconcileTagsResponse} message ReconcileTagsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReconcileTagsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReconcileTagsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse - * @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.ReconcileTagsResponse} ReconcileTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReconcileTagsResponse.decode = function decode(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.ReconcileTagsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.createdTagsCount = reader.int64(); - break; - } - case 2: { - message.updatedTagsCount = reader.int64(); - break; - } - case 3: { - message.deletedTagsCount = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReconcileTagsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ReconcileTagsResponse} ReconcileTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReconcileTagsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReconcileTagsResponse message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReconcileTagsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.createdTagsCount != null && message.hasOwnProperty("createdTagsCount")) - if (!$util.isInteger(message.createdTagsCount) && !(message.createdTagsCount && $util.isInteger(message.createdTagsCount.low) && $util.isInteger(message.createdTagsCount.high))) - return "createdTagsCount: integer|Long expected"; - if (message.updatedTagsCount != null && message.hasOwnProperty("updatedTagsCount")) - if (!$util.isInteger(message.updatedTagsCount) && !(message.updatedTagsCount && $util.isInteger(message.updatedTagsCount.low) && $util.isInteger(message.updatedTagsCount.high))) - return "updatedTagsCount: integer|Long expected"; - if (message.deletedTagsCount != null && message.hasOwnProperty("deletedTagsCount")) - if (!$util.isInteger(message.deletedTagsCount) && !(message.deletedTagsCount && $util.isInteger(message.deletedTagsCount.low) && $util.isInteger(message.deletedTagsCount.high))) - return "deletedTagsCount: integer|Long expected"; - return null; - }; - - /** - * Creates a ReconcileTagsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ReconcileTagsResponse} ReconcileTagsResponse - */ - ReconcileTagsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ReconcileTagsResponse) - return object; - var message = new $root.google.cloud.datacatalog.v1.ReconcileTagsResponse(); - if (object.createdTagsCount != null) - if ($util.Long) - (message.createdTagsCount = $util.Long.fromValue(object.createdTagsCount)).unsigned = false; - else if (typeof object.createdTagsCount === "string") - message.createdTagsCount = parseInt(object.createdTagsCount, 10); - else if (typeof object.createdTagsCount === "number") - message.createdTagsCount = object.createdTagsCount; - else if (typeof object.createdTagsCount === "object") - message.createdTagsCount = new $util.LongBits(object.createdTagsCount.low >>> 0, object.createdTagsCount.high >>> 0).toNumber(); - if (object.updatedTagsCount != null) - if ($util.Long) - (message.updatedTagsCount = $util.Long.fromValue(object.updatedTagsCount)).unsigned = false; - else if (typeof object.updatedTagsCount === "string") - message.updatedTagsCount = parseInt(object.updatedTagsCount, 10); - else if (typeof object.updatedTagsCount === "number") - message.updatedTagsCount = object.updatedTagsCount; - else if (typeof object.updatedTagsCount === "object") - message.updatedTagsCount = new $util.LongBits(object.updatedTagsCount.low >>> 0, object.updatedTagsCount.high >>> 0).toNumber(); - if (object.deletedTagsCount != null) - if ($util.Long) - (message.deletedTagsCount = $util.Long.fromValue(object.deletedTagsCount)).unsigned = false; - else if (typeof object.deletedTagsCount === "string") - message.deletedTagsCount = parseInt(object.deletedTagsCount, 10); - else if (typeof object.deletedTagsCount === "number") - message.deletedTagsCount = object.deletedTagsCount; - else if (typeof object.deletedTagsCount === "object") - message.deletedTagsCount = new $util.LongBits(object.deletedTagsCount.low >>> 0, object.deletedTagsCount.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a ReconcileTagsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse - * @static - * @param {google.cloud.datacatalog.v1.ReconcileTagsResponse} message ReconcileTagsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReconcileTagsResponse.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.createdTagsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.createdTagsCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.updatedTagsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.updatedTagsCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.deletedTagsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.deletedTagsCount = options.longs === String ? "0" : 0; - } - if (message.createdTagsCount != null && message.hasOwnProperty("createdTagsCount")) - if (typeof message.createdTagsCount === "number") - object.createdTagsCount = options.longs === String ? String(message.createdTagsCount) : message.createdTagsCount; - else - object.createdTagsCount = options.longs === String ? $util.Long.prototype.toString.call(message.createdTagsCount) : options.longs === Number ? new $util.LongBits(message.createdTagsCount.low >>> 0, message.createdTagsCount.high >>> 0).toNumber() : message.createdTagsCount; - if (message.updatedTagsCount != null && message.hasOwnProperty("updatedTagsCount")) - if (typeof message.updatedTagsCount === "number") - object.updatedTagsCount = options.longs === String ? String(message.updatedTagsCount) : message.updatedTagsCount; - else - object.updatedTagsCount = options.longs === String ? $util.Long.prototype.toString.call(message.updatedTagsCount) : options.longs === Number ? new $util.LongBits(message.updatedTagsCount.low >>> 0, message.updatedTagsCount.high >>> 0).toNumber() : message.updatedTagsCount; - if (message.deletedTagsCount != null && message.hasOwnProperty("deletedTagsCount")) - if (typeof message.deletedTagsCount === "number") - object.deletedTagsCount = options.longs === String ? String(message.deletedTagsCount) : message.deletedTagsCount; - else - object.deletedTagsCount = options.longs === String ? $util.Long.prototype.toString.call(message.deletedTagsCount) : options.longs === Number ? new $util.LongBits(message.deletedTagsCount.low >>> 0, message.deletedTagsCount.high >>> 0).toNumber() : message.deletedTagsCount; - return object; - }; - - /** - * Converts this ReconcileTagsResponse to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse - * @instance - * @returns {Object.} JSON object - */ - ReconcileTagsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReconcileTagsResponse - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ReconcileTagsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReconcileTagsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ReconcileTagsResponse"; - }; - - return ReconcileTagsResponse; - })(); - - v1.ReconcileTagsMetadata = (function() { - - /** - * Properties of a ReconcileTagsMetadata. - * @memberof google.cloud.datacatalog.v1 - * @interface IReconcileTagsMetadata - * @property {google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState|null} [state] ReconcileTagsMetadata state - * @property {Object.|null} [errors] ReconcileTagsMetadata errors - */ - - /** - * Constructs a new ReconcileTagsMetadata. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a ReconcileTagsMetadata. - * @implements IReconcileTagsMetadata - * @constructor - * @param {google.cloud.datacatalog.v1.IReconcileTagsMetadata=} [properties] Properties to set - */ - function ReconcileTagsMetadata(properties) { - this.errors = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReconcileTagsMetadata state. - * @member {google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState} state - * @memberof google.cloud.datacatalog.v1.ReconcileTagsMetadata - * @instance - */ - ReconcileTagsMetadata.prototype.state = 0; - - /** - * ReconcileTagsMetadata errors. - * @member {Object.} errors - * @memberof google.cloud.datacatalog.v1.ReconcileTagsMetadata - * @instance - */ - ReconcileTagsMetadata.prototype.errors = $util.emptyObject; - - /** - * Creates a new ReconcileTagsMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ReconcileTagsMetadata - * @static - * @param {google.cloud.datacatalog.v1.IReconcileTagsMetadata=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ReconcileTagsMetadata} ReconcileTagsMetadata instance - */ - ReconcileTagsMetadata.create = function create(properties) { - return new ReconcileTagsMetadata(properties); - }; - - /** - * Encodes the specified ReconcileTagsMetadata message. Does not implicitly {@link google.cloud.datacatalog.v1.ReconcileTagsMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ReconcileTagsMetadata - * @static - * @param {google.cloud.datacatalog.v1.IReconcileTagsMetadata} message ReconcileTagsMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReconcileTagsMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); - if (message.errors != null && Object.hasOwnProperty.call(message, "errors")) - for (var keys = Object.keys(message.errors), 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.rpc.Status.encode(message.errors[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ReconcileTagsMetadata message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ReconcileTagsMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ReconcileTagsMetadata - * @static - * @param {google.cloud.datacatalog.v1.IReconcileTagsMetadata} message ReconcileTagsMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReconcileTagsMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReconcileTagsMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ReconcileTagsMetadata - * @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.ReconcileTagsMetadata} ReconcileTagsMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReconcileTagsMetadata.decode = function decode(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.ReconcileTagsMetadata(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.state = reader.int32(); - break; - } - case 2: { - if (message.errors === $util.emptyObject) - message.errors = {}; - 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.rpc.Status.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.errors[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReconcileTagsMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ReconcileTagsMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ReconcileTagsMetadata} ReconcileTagsMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReconcileTagsMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReconcileTagsMetadata message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ReconcileTagsMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReconcileTagsMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.errors != null && message.hasOwnProperty("errors")) { - if (!$util.isObject(message.errors)) - return "errors: object expected"; - var key = Object.keys(message.errors); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.rpc.Status.verify(message.errors[key[i]]); - if (error) - return "errors." + error; - } - } - return null; - }; - - /** - * Creates a ReconcileTagsMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ReconcileTagsMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ReconcileTagsMetadata} ReconcileTagsMetadata - */ - ReconcileTagsMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ReconcileTagsMetadata) - return object; - var message = new $root.google.cloud.datacatalog.v1.ReconcileTagsMetadata(); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "RECONCILIATION_STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "RECONCILIATION_QUEUED": - case 1: - message.state = 1; - break; - case "RECONCILIATION_IN_PROGRESS": - case 2: - message.state = 2; - break; - case "RECONCILIATION_DONE": - case 3: - message.state = 3; - break; - } - if (object.errors) { - if (typeof object.errors !== "object") - throw TypeError(".google.cloud.datacatalog.v1.ReconcileTagsMetadata.errors: object expected"); - message.errors = {}; - for (var keys = Object.keys(object.errors), i = 0; i < keys.length; ++i) { - if (typeof object.errors[keys[i]] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.ReconcileTagsMetadata.errors: object expected"); - message.errors[keys[i]] = $root.google.rpc.Status.fromObject(object.errors[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a ReconcileTagsMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ReconcileTagsMetadata - * @static - * @param {google.cloud.datacatalog.v1.ReconcileTagsMetadata} message ReconcileTagsMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReconcileTagsMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.errors = {}; - if (options.defaults) - object.state = options.enums === String ? "RECONCILIATION_STATE_UNSPECIFIED" : 0; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState[message.state] === undefined ? message.state : $root.google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState[message.state] : message.state; - var keys2; - if (message.errors && (keys2 = Object.keys(message.errors)).length) { - object.errors = {}; - for (var j = 0; j < keys2.length; ++j) - object.errors[keys2[j]] = $root.google.rpc.Status.toObject(message.errors[keys2[j]], options); - } - return object; - }; - - /** - * Converts this ReconcileTagsMetadata to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ReconcileTagsMetadata - * @instance - * @returns {Object.} JSON object - */ - ReconcileTagsMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReconcileTagsMetadata - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ReconcileTagsMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReconcileTagsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ReconcileTagsMetadata"; - }; - - /** - * ReconciliationState enum. - * @name google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState - * @enum {number} - * @property {number} RECONCILIATION_STATE_UNSPECIFIED=0 RECONCILIATION_STATE_UNSPECIFIED value - * @property {number} RECONCILIATION_QUEUED=1 RECONCILIATION_QUEUED value - * @property {number} RECONCILIATION_IN_PROGRESS=2 RECONCILIATION_IN_PROGRESS value - * @property {number} RECONCILIATION_DONE=3 RECONCILIATION_DONE value - */ - ReconcileTagsMetadata.ReconciliationState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RECONCILIATION_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RECONCILIATION_QUEUED"] = 1; - values[valuesById[2] = "RECONCILIATION_IN_PROGRESS"] = 2; - values[valuesById[3] = "RECONCILIATION_DONE"] = 3; - return values; - })(); - - return ReconcileTagsMetadata; - })(); - - 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.ImportEntriesRequest = (function() { - - /** - * Properties of an ImportEntriesRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IImportEntriesRequest - * @property {string|null} [parent] ImportEntriesRequest parent - * @property {string|null} [gcsBucketPath] ImportEntriesRequest gcsBucketPath - * @property {string|null} [jobId] ImportEntriesRequest jobId - */ - - /** - * Constructs a new ImportEntriesRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents an ImportEntriesRequest. - * @implements IImportEntriesRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IImportEntriesRequest=} [properties] Properties to set - */ - function ImportEntriesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ImportEntriesRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest - * @instance - */ - ImportEntriesRequest.prototype.parent = ""; - - /** - * ImportEntriesRequest gcsBucketPath. - * @member {string|null|undefined} gcsBucketPath - * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest - * @instance - */ - ImportEntriesRequest.prototype.gcsBucketPath = null; - - /** - * ImportEntriesRequest jobId. - * @member {string} jobId - * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest - * @instance - */ - ImportEntriesRequest.prototype.jobId = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ImportEntriesRequest source. - * @member {"gcsBucketPath"|undefined} source - * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest - * @instance - */ - Object.defineProperty(ImportEntriesRequest.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["gcsBucketPath"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ImportEntriesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest - * @static - * @param {google.cloud.datacatalog.v1.IImportEntriesRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ImportEntriesRequest} ImportEntriesRequest instance - */ - ImportEntriesRequest.create = function create(properties) { - return new ImportEntriesRequest(properties); - }; - - /** - * Encodes the specified ImportEntriesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ImportEntriesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest - * @static - * @param {google.cloud.datacatalog.v1.IImportEntriesRequest} message ImportEntriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportEntriesRequest.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.gcsBucketPath != null && Object.hasOwnProperty.call(message, "gcsBucketPath")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.gcsBucketPath); - if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.jobId); - return writer; - }; - - /** - * Encodes the specified ImportEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ImportEntriesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest - * @static - * @param {google.cloud.datacatalog.v1.IImportEntriesRequest} message ImportEntriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportEntriesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest - * @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.ImportEntriesRequest} ImportEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportEntriesRequest.decode = function decode(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.ImportEntriesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.gcsBucketPath = reader.string(); - break; - } - case 3: { - message.jobId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImportEntriesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ImportEntriesRequest} ImportEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportEntriesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportEntriesRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportEntriesRequest.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.gcsBucketPath != null && message.hasOwnProperty("gcsBucketPath")) { - properties.source = 1; - if (!$util.isString(message.gcsBucketPath)) - return "gcsBucketPath: string expected"; - } - if (message.jobId != null && message.hasOwnProperty("jobId")) - if (!$util.isString(message.jobId)) - return "jobId: string expected"; - return null; - }; - - /** - * Creates an ImportEntriesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ImportEntriesRequest} ImportEntriesRequest - */ - ImportEntriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ImportEntriesRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.ImportEntriesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.gcsBucketPath != null) - message.gcsBucketPath = String(object.gcsBucketPath); - if (object.jobId != null) - message.jobId = String(object.jobId); - return message; - }; - - /** - * Creates a plain object from an ImportEntriesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest - * @static - * @param {google.cloud.datacatalog.v1.ImportEntriesRequest} message ImportEntriesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportEntriesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.jobId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.gcsBucketPath != null && message.hasOwnProperty("gcsBucketPath")) { - object.gcsBucketPath = message.gcsBucketPath; - if (options.oneofs) - object.source = "gcsBucketPath"; - } - if (message.jobId != null && message.hasOwnProperty("jobId")) - object.jobId = message.jobId; - return object; - }; - - /** - * Converts this ImportEntriesRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest - * @instance - * @returns {Object.} JSON object - */ - ImportEntriesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportEntriesRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ImportEntriesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportEntriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ImportEntriesRequest"; - }; - - return ImportEntriesRequest; - })(); - - v1.ImportEntriesResponse = (function() { - - /** - * Properties of an ImportEntriesResponse. - * @memberof google.cloud.datacatalog.v1 - * @interface IImportEntriesResponse - * @property {number|Long|null} [upsertedEntriesCount] ImportEntriesResponse upsertedEntriesCount - * @property {number|Long|null} [deletedEntriesCount] ImportEntriesResponse deletedEntriesCount - */ - - /** - * Constructs a new ImportEntriesResponse. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents an ImportEntriesResponse. - * @implements IImportEntriesResponse - * @constructor - * @param {google.cloud.datacatalog.v1.IImportEntriesResponse=} [properties] Properties to set - */ - function ImportEntriesResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ImportEntriesResponse upsertedEntriesCount. - * @member {number|Long|null|undefined} upsertedEntriesCount - * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse - * @instance - */ - ImportEntriesResponse.prototype.upsertedEntriesCount = null; - - /** - * ImportEntriesResponse deletedEntriesCount. - * @member {number|Long|null|undefined} deletedEntriesCount - * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse - * @instance - */ - ImportEntriesResponse.prototype.deletedEntriesCount = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ImportEntriesResponse _upsertedEntriesCount. - * @member {"upsertedEntriesCount"|undefined} _upsertedEntriesCount - * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse - * @instance - */ - Object.defineProperty(ImportEntriesResponse.prototype, "_upsertedEntriesCount", { - get: $util.oneOfGetter($oneOfFields = ["upsertedEntriesCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ImportEntriesResponse _deletedEntriesCount. - * @member {"deletedEntriesCount"|undefined} _deletedEntriesCount - * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse - * @instance - */ - Object.defineProperty(ImportEntriesResponse.prototype, "_deletedEntriesCount", { - get: $util.oneOfGetter($oneOfFields = ["deletedEntriesCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ImportEntriesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse - * @static - * @param {google.cloud.datacatalog.v1.IImportEntriesResponse=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ImportEntriesResponse} ImportEntriesResponse instance - */ - ImportEntriesResponse.create = function create(properties) { - return new ImportEntriesResponse(properties); - }; - - /** - * Encodes the specified ImportEntriesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.ImportEntriesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse - * @static - * @param {google.cloud.datacatalog.v1.IImportEntriesResponse} message ImportEntriesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportEntriesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.upsertedEntriesCount != null && Object.hasOwnProperty.call(message, "upsertedEntriesCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.upsertedEntriesCount); - if (message.deletedEntriesCount != null && Object.hasOwnProperty.call(message, "deletedEntriesCount")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.deletedEntriesCount); - return writer; - }; - - /** - * Encodes the specified ImportEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ImportEntriesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse - * @static - * @param {google.cloud.datacatalog.v1.IImportEntriesResponse} message ImportEntriesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportEntriesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse - * @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.ImportEntriesResponse} ImportEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportEntriesResponse.decode = function decode(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.ImportEntriesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 5: { - message.upsertedEntriesCount = reader.int64(); - break; - } - case 6: { - message.deletedEntriesCount = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImportEntriesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ImportEntriesResponse} ImportEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportEntriesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportEntriesResponse message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportEntriesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.upsertedEntriesCount != null && message.hasOwnProperty("upsertedEntriesCount")) { - properties._upsertedEntriesCount = 1; - if (!$util.isInteger(message.upsertedEntriesCount) && !(message.upsertedEntriesCount && $util.isInteger(message.upsertedEntriesCount.low) && $util.isInteger(message.upsertedEntriesCount.high))) - return "upsertedEntriesCount: integer|Long expected"; - } - if (message.deletedEntriesCount != null && message.hasOwnProperty("deletedEntriesCount")) { - properties._deletedEntriesCount = 1; - if (!$util.isInteger(message.deletedEntriesCount) && !(message.deletedEntriesCount && $util.isInteger(message.deletedEntriesCount.low) && $util.isInteger(message.deletedEntriesCount.high))) - return "deletedEntriesCount: integer|Long expected"; - } - return null; - }; - - /** - * Creates an ImportEntriesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ImportEntriesResponse} ImportEntriesResponse - */ - ImportEntriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ImportEntriesResponse) - return object; - var message = new $root.google.cloud.datacatalog.v1.ImportEntriesResponse(); - if (object.upsertedEntriesCount != null) - if ($util.Long) - (message.upsertedEntriesCount = $util.Long.fromValue(object.upsertedEntriesCount)).unsigned = false; - else if (typeof object.upsertedEntriesCount === "string") - message.upsertedEntriesCount = parseInt(object.upsertedEntriesCount, 10); - else if (typeof object.upsertedEntriesCount === "number") - message.upsertedEntriesCount = object.upsertedEntriesCount; - else if (typeof object.upsertedEntriesCount === "object") - message.upsertedEntriesCount = new $util.LongBits(object.upsertedEntriesCount.low >>> 0, object.upsertedEntriesCount.high >>> 0).toNumber(); - if (object.deletedEntriesCount != null) - if ($util.Long) - (message.deletedEntriesCount = $util.Long.fromValue(object.deletedEntriesCount)).unsigned = false; - else if (typeof object.deletedEntriesCount === "string") - message.deletedEntriesCount = parseInt(object.deletedEntriesCount, 10); - else if (typeof object.deletedEntriesCount === "number") - message.deletedEntriesCount = object.deletedEntriesCount; - else if (typeof object.deletedEntriesCount === "object") - message.deletedEntriesCount = new $util.LongBits(object.deletedEntriesCount.low >>> 0, object.deletedEntriesCount.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from an ImportEntriesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse - * @static - * @param {google.cloud.datacatalog.v1.ImportEntriesResponse} message ImportEntriesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportEntriesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.upsertedEntriesCount != null && message.hasOwnProperty("upsertedEntriesCount")) { - if (typeof message.upsertedEntriesCount === "number") - object.upsertedEntriesCount = options.longs === String ? String(message.upsertedEntriesCount) : message.upsertedEntriesCount; - else - object.upsertedEntriesCount = options.longs === String ? $util.Long.prototype.toString.call(message.upsertedEntriesCount) : options.longs === Number ? new $util.LongBits(message.upsertedEntriesCount.low >>> 0, message.upsertedEntriesCount.high >>> 0).toNumber() : message.upsertedEntriesCount; - if (options.oneofs) - object._upsertedEntriesCount = "upsertedEntriesCount"; - } - if (message.deletedEntriesCount != null && message.hasOwnProperty("deletedEntriesCount")) { - if (typeof message.deletedEntriesCount === "number") - object.deletedEntriesCount = options.longs === String ? String(message.deletedEntriesCount) : message.deletedEntriesCount; - else - object.deletedEntriesCount = options.longs === String ? $util.Long.prototype.toString.call(message.deletedEntriesCount) : options.longs === Number ? new $util.LongBits(message.deletedEntriesCount.low >>> 0, message.deletedEntriesCount.high >>> 0).toNumber() : message.deletedEntriesCount; - if (options.oneofs) - object._deletedEntriesCount = "deletedEntriesCount"; - } - return object; - }; - - /** - * Converts this ImportEntriesResponse to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse - * @instance - * @returns {Object.} JSON object - */ - ImportEntriesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportEntriesResponse - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ImportEntriesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportEntriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ImportEntriesResponse"; - }; - - return ImportEntriesResponse; - })(); - - v1.ImportEntriesMetadata = (function() { - - /** - * Properties of an ImportEntriesMetadata. - * @memberof google.cloud.datacatalog.v1 - * @interface IImportEntriesMetadata - * @property {google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState|null} [state] ImportEntriesMetadata state - * @property {Array.|null} [errors] ImportEntriesMetadata errors - */ - - /** - * Constructs a new ImportEntriesMetadata. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents an ImportEntriesMetadata. - * @implements IImportEntriesMetadata - * @constructor - * @param {google.cloud.datacatalog.v1.IImportEntriesMetadata=} [properties] Properties to set - */ - function ImportEntriesMetadata(properties) { - this.errors = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ImportEntriesMetadata state. - * @member {google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState} state - * @memberof google.cloud.datacatalog.v1.ImportEntriesMetadata - * @instance - */ - ImportEntriesMetadata.prototype.state = 0; - - /** - * ImportEntriesMetadata errors. - * @member {Array.} errors - * @memberof google.cloud.datacatalog.v1.ImportEntriesMetadata - * @instance - */ - ImportEntriesMetadata.prototype.errors = $util.emptyArray; - - /** - * Creates a new ImportEntriesMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ImportEntriesMetadata - * @static - * @param {google.cloud.datacatalog.v1.IImportEntriesMetadata=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ImportEntriesMetadata} ImportEntriesMetadata instance - */ - ImportEntriesMetadata.create = function create(properties) { - return new ImportEntriesMetadata(properties); - }; - - /** - * Encodes the specified ImportEntriesMetadata message. Does not implicitly {@link google.cloud.datacatalog.v1.ImportEntriesMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ImportEntriesMetadata - * @static - * @param {google.cloud.datacatalog.v1.IImportEntriesMetadata} message ImportEntriesMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportEntriesMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); - if (message.errors != null && message.errors.length) - for (var i = 0; i < message.errors.length; ++i) - $root.google.rpc.Status.encode(message.errors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ImportEntriesMetadata message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ImportEntriesMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ImportEntriesMetadata - * @static - * @param {google.cloud.datacatalog.v1.IImportEntriesMetadata} message ImportEntriesMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportEntriesMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportEntriesMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ImportEntriesMetadata - * @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.ImportEntriesMetadata} ImportEntriesMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportEntriesMetadata.decode = function decode(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.ImportEntriesMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.state = reader.int32(); - break; - } - case 2: { - if (!(message.errors && message.errors.length)) - message.errors = []; - message.errors.push($root.google.rpc.Status.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImportEntriesMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ImportEntriesMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ImportEntriesMetadata} ImportEntriesMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportEntriesMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportEntriesMetadata message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ImportEntriesMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportEntriesMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.errors != null && message.hasOwnProperty("errors")) { - if (!Array.isArray(message.errors)) - return "errors: array expected"; - for (var i = 0; i < message.errors.length; ++i) { - var error = $root.google.rpc.Status.verify(message.errors[i]); - if (error) - return "errors." + error; - } - } - return null; - }; - - /** - * Creates an ImportEntriesMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ImportEntriesMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ImportEntriesMetadata} ImportEntriesMetadata - */ - ImportEntriesMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ImportEntriesMetadata) - return object; - var message = new $root.google.cloud.datacatalog.v1.ImportEntriesMetadata(); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "IMPORT_STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "IMPORT_QUEUED": - case 1: - message.state = 1; - break; - case "IMPORT_IN_PROGRESS": - case 2: - message.state = 2; - break; - case "IMPORT_DONE": - case 3: - message.state = 3; - break; - case "IMPORT_OBSOLETE": - case 4: - message.state = 4; - break; - } - if (object.errors) { - if (!Array.isArray(object.errors)) - throw TypeError(".google.cloud.datacatalog.v1.ImportEntriesMetadata.errors: array expected"); - message.errors = []; - for (var i = 0; i < object.errors.length; ++i) { - if (typeof object.errors[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.ImportEntriesMetadata.errors: object expected"); - message.errors[i] = $root.google.rpc.Status.fromObject(object.errors[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an ImportEntriesMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ImportEntriesMetadata - * @static - * @param {google.cloud.datacatalog.v1.ImportEntriesMetadata} message ImportEntriesMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportEntriesMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.errors = []; - if (options.defaults) - object.state = options.enums === String ? "IMPORT_STATE_UNSPECIFIED" : 0; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState[message.state] === undefined ? message.state : $root.google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState[message.state] : message.state; - if (message.errors && message.errors.length) { - object.errors = []; - for (var j = 0; j < message.errors.length; ++j) - object.errors[j] = $root.google.rpc.Status.toObject(message.errors[j], options); - } - return object; - }; - - /** - * Converts this ImportEntriesMetadata to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ImportEntriesMetadata - * @instance - * @returns {Object.} JSON object - */ - ImportEntriesMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportEntriesMetadata - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ImportEntriesMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportEntriesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ImportEntriesMetadata"; - }; - - /** - * ImportState enum. - * @name google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState - * @enum {number} - * @property {number} IMPORT_STATE_UNSPECIFIED=0 IMPORT_STATE_UNSPECIFIED value - * @property {number} IMPORT_QUEUED=1 IMPORT_QUEUED value - * @property {number} IMPORT_IN_PROGRESS=2 IMPORT_IN_PROGRESS value - * @property {number} IMPORT_DONE=3 IMPORT_DONE value - * @property {number} IMPORT_OBSOLETE=4 IMPORT_OBSOLETE value - */ - ImportEntriesMetadata.ImportState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IMPORT_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "IMPORT_QUEUED"] = 1; - values[valuesById[2] = "IMPORT_IN_PROGRESS"] = 2; - values[valuesById[3] = "IMPORT_DONE"] = 3; - values[valuesById[4] = "IMPORT_OBSOLETE"] = 4; - return values; - })(); - - return ImportEntriesMetadata; - })(); - - 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 - * @property {number} DATABASE_SCHEMA=15 DATABASE_SCHEMA value - * @property {number} DASHBOARD=16 DASHBOARD value - * @property {number} EXPLORE=17 EXPLORE value - * @property {number} LOOK=18 LOOK value - * @property {number} FEATURE_ONLINE_STORE=19 FEATURE_ONLINE_STORE value - * @property {number} FEATURE_VIEW=20 FEATURE_VIEW value - * @property {number} FEATURE_GROUP=21 FEATURE_GROUP 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; - values[valuesById[15] = "DATABASE_SCHEMA"] = 15; - values[valuesById[16] = "DASHBOARD"] = 16; - values[valuesById[17] = "EXPLORE"] = 17; - values[valuesById[18] = "LOOK"] = 18; - values[valuesById[19] = "FEATURE_ONLINE_STORE"] = 19; - values[valuesById[20] = "FEATURE_VIEW"] = 20; - values[valuesById[21] = "FEATURE_GROUP"] = 21; - return values; - })(); - - v1.SetConfigRequest = (function() { - - /** - * Properties of a SetConfigRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface ISetConfigRequest - * @property {string|null} [name] SetConfigRequest name - * @property {google.cloud.datacatalog.v1.TagTemplateMigration|null} [tagTemplateMigration] SetConfigRequest tagTemplateMigration - * @property {google.cloud.datacatalog.v1.CatalogUIExperience|null} [catalogUiExperience] SetConfigRequest catalogUiExperience - */ - - /** - * Constructs a new SetConfigRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a SetConfigRequest. - * @implements ISetConfigRequest - * @constructor - * @param {google.cloud.datacatalog.v1.ISetConfigRequest=} [properties] Properties to set - */ - function SetConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetConfigRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.SetConfigRequest - * @instance - */ - SetConfigRequest.prototype.name = ""; - - /** - * SetConfigRequest tagTemplateMigration. - * @member {google.cloud.datacatalog.v1.TagTemplateMigration|null|undefined} tagTemplateMigration - * @memberof google.cloud.datacatalog.v1.SetConfigRequest - * @instance - */ - SetConfigRequest.prototype.tagTemplateMigration = null; - - /** - * SetConfigRequest catalogUiExperience. - * @member {google.cloud.datacatalog.v1.CatalogUIExperience|null|undefined} catalogUiExperience - * @memberof google.cloud.datacatalog.v1.SetConfigRequest - * @instance - */ - SetConfigRequest.prototype.catalogUiExperience = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SetConfigRequest configuration. - * @member {"tagTemplateMigration"|"catalogUiExperience"|undefined} configuration - * @memberof google.cloud.datacatalog.v1.SetConfigRequest - * @instance - */ - Object.defineProperty(SetConfigRequest.prototype, "configuration", { - get: $util.oneOfGetter($oneOfFields = ["tagTemplateMigration", "catalogUiExperience"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SetConfigRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.SetConfigRequest - * @static - * @param {google.cloud.datacatalog.v1.ISetConfigRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.SetConfigRequest} SetConfigRequest instance - */ - SetConfigRequest.create = function create(properties) { - return new SetConfigRequest(properties); - }; - - /** - * Encodes the specified SetConfigRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.SetConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.SetConfigRequest - * @static - * @param {google.cloud.datacatalog.v1.ISetConfigRequest} message SetConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetConfigRequest.encode = function encode(message, writer) { - 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.tagTemplateMigration != null && Object.hasOwnProperty.call(message, "tagTemplateMigration")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.tagTemplateMigration); - if (message.catalogUiExperience != null && Object.hasOwnProperty.call(message, "catalogUiExperience")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.catalogUiExperience); - return writer; - }; - - /** - * Encodes the specified SetConfigRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.SetConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.SetConfigRequest - * @static - * @param {google.cloud.datacatalog.v1.ISetConfigRequest} message SetConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.SetConfigRequest - * @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.SetConfigRequest} SetConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetConfigRequest.decode = function decode(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.SetConfigRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.tagTemplateMigration = reader.int32(); - break; - } - case 3: { - message.catalogUiExperience = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.SetConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.SetConfigRequest} SetConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetConfigRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.SetConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetConfigRequest.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.tagTemplateMigration != null && message.hasOwnProperty("tagTemplateMigration")) { - properties.configuration = 1; - switch (message.tagTemplateMigration) { - default: - return "tagTemplateMigration: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.catalogUiExperience != null && message.hasOwnProperty("catalogUiExperience")) { - if (properties.configuration === 1) - return "configuration: multiple values"; - properties.configuration = 1; - switch (message.catalogUiExperience) { - default: - return "catalogUiExperience: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - return null; - }; - - /** - * Creates a SetConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.SetConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.SetConfigRequest} SetConfigRequest - */ - SetConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.SetConfigRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.SetConfigRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.tagTemplateMigration) { - default: - if (typeof object.tagTemplateMigration === "number") { - message.tagTemplateMigration = object.tagTemplateMigration; - break; - } - break; - case "TAG_TEMPLATE_MIGRATION_UNSPECIFIED": - case 0: - message.tagTemplateMigration = 0; - break; - case "TAG_TEMPLATE_MIGRATION_ENABLED": - case 1: - message.tagTemplateMigration = 1; - break; - case "TAG_TEMPLATE_MIGRATION_DISABLED": - case 2: - message.tagTemplateMigration = 2; - break; - } - switch (object.catalogUiExperience) { - default: - if (typeof object.catalogUiExperience === "number") { - message.catalogUiExperience = object.catalogUiExperience; - break; - } - break; - case "CATALOG_UI_EXPERIENCE_UNSPECIFIED": - case 0: - message.catalogUiExperience = 0; - break; - case "CATALOG_UI_EXPERIENCE_ENABLED": - case 1: - message.catalogUiExperience = 1; - break; - case "CATALOG_UI_EXPERIENCE_DISABLED": - case 2: - message.catalogUiExperience = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a SetConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.SetConfigRequest - * @static - * @param {google.cloud.datacatalog.v1.SetConfigRequest} message SetConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetConfigRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.tagTemplateMigration != null && message.hasOwnProperty("tagTemplateMigration")) { - object.tagTemplateMigration = options.enums === String ? $root.google.cloud.datacatalog.v1.TagTemplateMigration[message.tagTemplateMigration] === undefined ? message.tagTemplateMigration : $root.google.cloud.datacatalog.v1.TagTemplateMigration[message.tagTemplateMigration] : message.tagTemplateMigration; - if (options.oneofs) - object.configuration = "tagTemplateMigration"; - } - if (message.catalogUiExperience != null && message.hasOwnProperty("catalogUiExperience")) { - object.catalogUiExperience = options.enums === String ? $root.google.cloud.datacatalog.v1.CatalogUIExperience[message.catalogUiExperience] === undefined ? message.catalogUiExperience : $root.google.cloud.datacatalog.v1.CatalogUIExperience[message.catalogUiExperience] : message.catalogUiExperience; - if (options.oneofs) - object.configuration = "catalogUiExperience"; - } - return object; - }; - - /** - * Converts this SetConfigRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.SetConfigRequest - * @instance - * @returns {Object.} JSON object - */ - SetConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetConfigRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.SetConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.SetConfigRequest"; - }; - - return SetConfigRequest; - })(); - - v1.RetrieveConfigRequest = (function() { - - /** - * Properties of a RetrieveConfigRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IRetrieveConfigRequest - * @property {string|null} [name] RetrieveConfigRequest name - */ - - /** - * Constructs a new RetrieveConfigRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a RetrieveConfigRequest. - * @implements IRetrieveConfigRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IRetrieveConfigRequest=} [properties] Properties to set - */ - function RetrieveConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RetrieveConfigRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.RetrieveConfigRequest - * @instance - */ - RetrieveConfigRequest.prototype.name = ""; - - /** - * Creates a new RetrieveConfigRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.RetrieveConfigRequest - * @static - * @param {google.cloud.datacatalog.v1.IRetrieveConfigRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.RetrieveConfigRequest} RetrieveConfigRequest instance - */ - RetrieveConfigRequest.create = function create(properties) { - return new RetrieveConfigRequest(properties); - }; - - /** - * Encodes the specified RetrieveConfigRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.RetrieveConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.RetrieveConfigRequest - * @static - * @param {google.cloud.datacatalog.v1.IRetrieveConfigRequest} message RetrieveConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RetrieveConfigRequest.encode = function encode(message, writer) { - 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 RetrieveConfigRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.RetrieveConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.RetrieveConfigRequest - * @static - * @param {google.cloud.datacatalog.v1.IRetrieveConfigRequest} message RetrieveConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RetrieveConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RetrieveConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.RetrieveConfigRequest - * @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.RetrieveConfigRequest} RetrieveConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RetrieveConfigRequest.decode = function decode(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.RetrieveConfigRequest(); - 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 RetrieveConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.RetrieveConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.RetrieveConfigRequest} RetrieveConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RetrieveConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RetrieveConfigRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.RetrieveConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RetrieveConfigRequest.verify = function verify(message) { - if (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 RetrieveConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.RetrieveConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.RetrieveConfigRequest} RetrieveConfigRequest - */ - RetrieveConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.RetrieveConfigRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.RetrieveConfigRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a RetrieveConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.RetrieveConfigRequest - * @static - * @param {google.cloud.datacatalog.v1.RetrieveConfigRequest} message RetrieveConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RetrieveConfigRequest.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 RetrieveConfigRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.RetrieveConfigRequest - * @instance - * @returns {Object.} JSON object - */ - RetrieveConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RetrieveConfigRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.RetrieveConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RetrieveConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.RetrieveConfigRequest"; - }; - - return RetrieveConfigRequest; - })(); - - v1.RetrieveEffectiveConfigRequest = (function() { - - /** - * Properties of a RetrieveEffectiveConfigRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IRetrieveEffectiveConfigRequest - * @property {string|null} [name] RetrieveEffectiveConfigRequest name - */ - - /** - * Constructs a new RetrieveEffectiveConfigRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a RetrieveEffectiveConfigRequest. - * @implements IRetrieveEffectiveConfigRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest=} [properties] Properties to set - */ - function RetrieveEffectiveConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RetrieveEffectiveConfigRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest - * @instance - */ - RetrieveEffectiveConfigRequest.prototype.name = ""; - - /** - * Creates a new RetrieveEffectiveConfigRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest - * @static - * @param {google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest} RetrieveEffectiveConfigRequest instance - */ - RetrieveEffectiveConfigRequest.create = function create(properties) { - return new RetrieveEffectiveConfigRequest(properties); - }; - - /** - * Encodes the specified RetrieveEffectiveConfigRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest - * @static - * @param {google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest} message RetrieveEffectiveConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RetrieveEffectiveConfigRequest.encode = function encode(message, writer) { - 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 RetrieveEffectiveConfigRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest - * @static - * @param {google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest} message RetrieveEffectiveConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RetrieveEffectiveConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RetrieveEffectiveConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest - * @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.RetrieveEffectiveConfigRequest} RetrieveEffectiveConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RetrieveEffectiveConfigRequest.decode = function decode(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.RetrieveEffectiveConfigRequest(); - 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 RetrieveEffectiveConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest} RetrieveEffectiveConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RetrieveEffectiveConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RetrieveEffectiveConfigRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RetrieveEffectiveConfigRequest.verify = function verify(message) { - if (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 RetrieveEffectiveConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest} RetrieveEffectiveConfigRequest - */ - RetrieveEffectiveConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a RetrieveEffectiveConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest - * @static - * @param {google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest} message RetrieveEffectiveConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RetrieveEffectiveConfigRequest.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 RetrieveEffectiveConfigRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest - * @instance - * @returns {Object.} JSON object - */ - RetrieveEffectiveConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RetrieveEffectiveConfigRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RetrieveEffectiveConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest"; - }; - - return RetrieveEffectiveConfigRequest; - })(); - - /** - * TagTemplateMigration enum. - * @name google.cloud.datacatalog.v1.TagTemplateMigration - * @enum {number} - * @property {number} TAG_TEMPLATE_MIGRATION_UNSPECIFIED=0 TAG_TEMPLATE_MIGRATION_UNSPECIFIED value - * @property {number} TAG_TEMPLATE_MIGRATION_ENABLED=1 TAG_TEMPLATE_MIGRATION_ENABLED value - * @property {number} TAG_TEMPLATE_MIGRATION_DISABLED=2 TAG_TEMPLATE_MIGRATION_DISABLED value - */ - v1.TagTemplateMigration = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TAG_TEMPLATE_MIGRATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "TAG_TEMPLATE_MIGRATION_ENABLED"] = 1; - values[valuesById[2] = "TAG_TEMPLATE_MIGRATION_DISABLED"] = 2; - return values; - })(); - - /** - * CatalogUIExperience enum. - * @name google.cloud.datacatalog.v1.CatalogUIExperience - * @enum {number} - * @property {number} CATALOG_UI_EXPERIENCE_UNSPECIFIED=0 CATALOG_UI_EXPERIENCE_UNSPECIFIED value - * @property {number} CATALOG_UI_EXPERIENCE_ENABLED=1 CATALOG_UI_EXPERIENCE_ENABLED value - * @property {number} CATALOG_UI_EXPERIENCE_DISABLED=2 CATALOG_UI_EXPERIENCE_DISABLED value - */ - v1.CatalogUIExperience = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CATALOG_UI_EXPERIENCE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CATALOG_UI_EXPERIENCE_ENABLED"] = 1; - values[valuesById[2] = "CATALOG_UI_EXPERIENCE_DISABLED"] = 2; - return values; - })(); - - v1.OrganizationConfig = (function() { - - /** - * Properties of an OrganizationConfig. - * @memberof google.cloud.datacatalog.v1 - * @interface IOrganizationConfig - * @property {Object.|null} [config] OrganizationConfig config - */ - - /** - * Constructs a new OrganizationConfig. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents an OrganizationConfig. - * @implements IOrganizationConfig - * @constructor - * @param {google.cloud.datacatalog.v1.IOrganizationConfig=} [properties] Properties to set - */ - function OrganizationConfig(properties) { - this.config = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OrganizationConfig config. - * @member {Object.} config - * @memberof google.cloud.datacatalog.v1.OrganizationConfig - * @instance - */ - OrganizationConfig.prototype.config = $util.emptyObject; - - /** - * Creates a new OrganizationConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.OrganizationConfig - * @static - * @param {google.cloud.datacatalog.v1.IOrganizationConfig=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.OrganizationConfig} OrganizationConfig instance - */ - OrganizationConfig.create = function create(properties) { - return new OrganizationConfig(properties); - }; - - /** - * Encodes the specified OrganizationConfig message. Does not implicitly {@link google.cloud.datacatalog.v1.OrganizationConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.OrganizationConfig - * @static - * @param {google.cloud.datacatalog.v1.IOrganizationConfig} message OrganizationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OrganizationConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - for (var keys = Object.keys(message.config), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.datacatalog.v1.MigrationConfig.encode(message.config[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; - - /** - * Encodes the specified OrganizationConfig message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.OrganizationConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.OrganizationConfig - * @static - * @param {google.cloud.datacatalog.v1.IOrganizationConfig} message OrganizationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OrganizationConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OrganizationConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.OrganizationConfig - * @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.OrganizationConfig} OrganizationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OrganizationConfig.decode = function decode(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.OrganizationConfig(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (message.config === $util.emptyObject) - message.config = {}; - 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.MigrationConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.config[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OrganizationConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.OrganizationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.OrganizationConfig} OrganizationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OrganizationConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OrganizationConfig message. - * @function verify - * @memberof google.cloud.datacatalog.v1.OrganizationConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OrganizationConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.config != null && message.hasOwnProperty("config")) { - if (!$util.isObject(message.config)) - return "config: object expected"; - var key = Object.keys(message.config); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.datacatalog.v1.MigrationConfig.verify(message.config[key[i]]); - if (error) - return "config." + error; - } - } - return null; - }; - - /** - * Creates an OrganizationConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.OrganizationConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.OrganizationConfig} OrganizationConfig - */ - OrganizationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.OrganizationConfig) - return object; - var message = new $root.google.cloud.datacatalog.v1.OrganizationConfig(); - if (object.config) { - if (typeof object.config !== "object") - throw TypeError(".google.cloud.datacatalog.v1.OrganizationConfig.config: object expected"); - message.config = {}; - for (var keys = Object.keys(object.config), i = 0; i < keys.length; ++i) { - if (typeof object.config[keys[i]] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.OrganizationConfig.config: object expected"); - message.config[keys[i]] = $root.google.cloud.datacatalog.v1.MigrationConfig.fromObject(object.config[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from an OrganizationConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.OrganizationConfig - * @static - * @param {google.cloud.datacatalog.v1.OrganizationConfig} message OrganizationConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OrganizationConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.config = {}; - var keys2; - if (message.config && (keys2 = Object.keys(message.config)).length) { - object.config = {}; - for (var j = 0; j < keys2.length; ++j) - object.config[keys2[j]] = $root.google.cloud.datacatalog.v1.MigrationConfig.toObject(message.config[keys2[j]], options); - } - return object; - }; - - /** - * Converts this OrganizationConfig to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.OrganizationConfig - * @instance - * @returns {Object.} JSON object - */ - OrganizationConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OrganizationConfig - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.OrganizationConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OrganizationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.OrganizationConfig"; - }; - - return OrganizationConfig; - })(); - - v1.MigrationConfig = (function() { - - /** - * Properties of a MigrationConfig. - * @memberof google.cloud.datacatalog.v1 - * @interface IMigrationConfig - * @property {google.cloud.datacatalog.v1.TagTemplateMigration|null} [tagTemplateMigration] MigrationConfig tagTemplateMigration - * @property {google.cloud.datacatalog.v1.CatalogUIExperience|null} [catalogUiExperience] MigrationConfig catalogUiExperience - */ - - /** - * Constructs a new MigrationConfig. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a MigrationConfig. - * @implements IMigrationConfig - * @constructor - * @param {google.cloud.datacatalog.v1.IMigrationConfig=} [properties] Properties to set - */ - function MigrationConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MigrationConfig tagTemplateMigration. - * @member {google.cloud.datacatalog.v1.TagTemplateMigration} tagTemplateMigration - * @memberof google.cloud.datacatalog.v1.MigrationConfig - * @instance - */ - MigrationConfig.prototype.tagTemplateMigration = 0; - - /** - * MigrationConfig catalogUiExperience. - * @member {google.cloud.datacatalog.v1.CatalogUIExperience} catalogUiExperience - * @memberof google.cloud.datacatalog.v1.MigrationConfig - * @instance - */ - MigrationConfig.prototype.catalogUiExperience = 0; - - /** - * Creates a new MigrationConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.MigrationConfig - * @static - * @param {google.cloud.datacatalog.v1.IMigrationConfig=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.MigrationConfig} MigrationConfig instance - */ - MigrationConfig.create = function create(properties) { - return new MigrationConfig(properties); - }; - - /** - * Encodes the specified MigrationConfig message. Does not implicitly {@link google.cloud.datacatalog.v1.MigrationConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.MigrationConfig - * @static - * @param {google.cloud.datacatalog.v1.IMigrationConfig} message MigrationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MigrationConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tagTemplateMigration != null && Object.hasOwnProperty.call(message, "tagTemplateMigration")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tagTemplateMigration); - if (message.catalogUiExperience != null && Object.hasOwnProperty.call(message, "catalogUiExperience")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.catalogUiExperience); - return writer; - }; - - /** - * Encodes the specified MigrationConfig message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.MigrationConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.MigrationConfig - * @static - * @param {google.cloud.datacatalog.v1.IMigrationConfig} message MigrationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MigrationConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MigrationConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.MigrationConfig - * @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.MigrationConfig} MigrationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MigrationConfig.decode = function decode(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.MigrationConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.tagTemplateMigration = reader.int32(); - break; - } - case 2: { - message.catalogUiExperience = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MigrationConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.MigrationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.MigrationConfig} MigrationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MigrationConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MigrationConfig message. - * @function verify - * @memberof google.cloud.datacatalog.v1.MigrationConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MigrationConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tagTemplateMigration != null && message.hasOwnProperty("tagTemplateMigration")) - switch (message.tagTemplateMigration) { - default: - return "tagTemplateMigration: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.catalogUiExperience != null && message.hasOwnProperty("catalogUiExperience")) - switch (message.catalogUiExperience) { - default: - return "catalogUiExperience: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a MigrationConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.MigrationConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.MigrationConfig} MigrationConfig - */ - MigrationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.MigrationConfig) - return object; - var message = new $root.google.cloud.datacatalog.v1.MigrationConfig(); - switch (object.tagTemplateMigration) { - default: - if (typeof object.tagTemplateMigration === "number") { - message.tagTemplateMigration = object.tagTemplateMigration; - break; - } - break; - case "TAG_TEMPLATE_MIGRATION_UNSPECIFIED": - case 0: - message.tagTemplateMigration = 0; - break; - case "TAG_TEMPLATE_MIGRATION_ENABLED": - case 1: - message.tagTemplateMigration = 1; - break; - case "TAG_TEMPLATE_MIGRATION_DISABLED": - case 2: - message.tagTemplateMigration = 2; - break; - } - switch (object.catalogUiExperience) { - default: - if (typeof object.catalogUiExperience === "number") { - message.catalogUiExperience = object.catalogUiExperience; - break; - } - break; - case "CATALOG_UI_EXPERIENCE_UNSPECIFIED": - case 0: - message.catalogUiExperience = 0; - break; - case "CATALOG_UI_EXPERIENCE_ENABLED": - case 1: - message.catalogUiExperience = 1; - break; - case "CATALOG_UI_EXPERIENCE_DISABLED": - case 2: - message.catalogUiExperience = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a MigrationConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.MigrationConfig - * @static - * @param {google.cloud.datacatalog.v1.MigrationConfig} message MigrationConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MigrationConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.tagTemplateMigration = options.enums === String ? "TAG_TEMPLATE_MIGRATION_UNSPECIFIED" : 0; - object.catalogUiExperience = options.enums === String ? "CATALOG_UI_EXPERIENCE_UNSPECIFIED" : 0; - } - if (message.tagTemplateMigration != null && message.hasOwnProperty("tagTemplateMigration")) - object.tagTemplateMigration = options.enums === String ? $root.google.cloud.datacatalog.v1.TagTemplateMigration[message.tagTemplateMigration] === undefined ? message.tagTemplateMigration : $root.google.cloud.datacatalog.v1.TagTemplateMigration[message.tagTemplateMigration] : message.tagTemplateMigration; - if (message.catalogUiExperience != null && message.hasOwnProperty("catalogUiExperience")) - object.catalogUiExperience = options.enums === String ? $root.google.cloud.datacatalog.v1.CatalogUIExperience[message.catalogUiExperience] === undefined ? message.catalogUiExperience : $root.google.cloud.datacatalog.v1.CatalogUIExperience[message.catalogUiExperience] : message.catalogUiExperience; - return object; - }; - - /** - * Converts this MigrationConfig to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.MigrationConfig - * @instance - * @returns {Object.} JSON object - */ - MigrationConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MigrationConfig - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.MigrationConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MigrationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.MigrationConfig"; - }; - - return MigrationConfig; - })(); - - 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: - case 6: - case 7: - case 8: - case 9: - case 10: - 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; - case "CLOUD_SPANNER": - case 6: - message.system = 6; - break; - case "CLOUD_BIGTABLE": - case 7: - message.system = 7; - break; - case "CLOUD_SQL": - case 8: - message.system = 8; - break; - case "LOOKER": - case 9: - message.system = 9; - break; - case "VERTEX_AI": - case 10: - message.system = 10; - 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 {string|null} [defaultValue] ColumnSchema defaultValue - * @property {number|null} [ordinalPosition] ColumnSchema ordinalPosition - * @property {google.cloud.datacatalog.v1.ColumnSchema.IndexingType|null} [highestIndexingType] ColumnSchema highestIndexingType - * @property {Array.|null} [subcolumns] ColumnSchema subcolumns - * @property {google.cloud.datacatalog.v1.ColumnSchema.ILookerColumnSpec|null} [lookerColumnSpec] ColumnSchema lookerColumnSpec - * @property {google.cloud.datacatalog.v1.ColumnSchema.IFieldElementType|null} [rangeElementType] ColumnSchema rangeElementType - * @property {string|null} [gcRule] ColumnSchema gcRule - */ - - /** - * 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 defaultValue. - * @member {string} defaultValue - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @instance - */ - ColumnSchema.prototype.defaultValue = ""; - - /** - * ColumnSchema ordinalPosition. - * @member {number} ordinalPosition - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @instance - */ - ColumnSchema.prototype.ordinalPosition = 0; - - /** - * ColumnSchema highestIndexingType. - * @member {google.cloud.datacatalog.v1.ColumnSchema.IndexingType} highestIndexingType - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @instance - */ - ColumnSchema.prototype.highestIndexingType = 0; - - /** - * ColumnSchema subcolumns. - * @member {Array.} subcolumns - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @instance - */ - ColumnSchema.prototype.subcolumns = $util.emptyArray; - - /** - * ColumnSchema lookerColumnSpec. - * @member {google.cloud.datacatalog.v1.ColumnSchema.ILookerColumnSpec|null|undefined} lookerColumnSpec - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @instance - */ - ColumnSchema.prototype.lookerColumnSpec = null; - - /** - * ColumnSchema rangeElementType. - * @member {google.cloud.datacatalog.v1.ColumnSchema.IFieldElementType|null|undefined} rangeElementType - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @instance - */ - ColumnSchema.prototype.rangeElementType = null; - - /** - * ColumnSchema gcRule. - * @member {string} gcRule - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @instance - */ - ColumnSchema.prototype.gcRule = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ColumnSchema systemSpec. - * @member {"lookerColumnSpec"|undefined} systemSpec - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @instance - */ - Object.defineProperty(ColumnSchema.prototype, "systemSpec", { - get: $util.oneOfGetter($oneOfFields = ["lookerColumnSpec"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * 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(); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.defaultValue); - if (message.ordinalPosition != null && Object.hasOwnProperty.call(message, "ordinalPosition")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.ordinalPosition); - if (message.highestIndexingType != null && Object.hasOwnProperty.call(message, "highestIndexingType")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.highestIndexingType); - if (message.gcRule != null && Object.hasOwnProperty.call(message, "gcRule")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.gcRule); - if (message.lookerColumnSpec != null && Object.hasOwnProperty.call(message, "lookerColumnSpec")) - $root.google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.encode(message.lookerColumnSpec, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.rangeElementType != null && Object.hasOwnProperty.call(message, "rangeElementType")) - $root.google.cloud.datacatalog.v1.ColumnSchema.FieldElementType.encode(message.rangeElementType, writer.uint32(/* id 19, wireType 2 =*/154).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 8: { - message.defaultValue = reader.string(); - break; - } - case 9: { - message.ordinalPosition = reader.int32(); - break; - } - case 10: { - message.highestIndexingType = reader.int32(); - 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; - } - case 18: { - message.lookerColumnSpec = $root.google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.decode(reader, reader.uint32()); - break; - } - case 19: { - message.rangeElementType = $root.google.cloud.datacatalog.v1.ColumnSchema.FieldElementType.decode(reader, reader.uint32()); - break; - } - case 11: { - message.gcRule = reader.string(); - 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"; - var properties = {}; - 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.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) - if (!$util.isInteger(message.ordinalPosition)) - return "ordinalPosition: integer expected"; - if (message.highestIndexingType != null && message.hasOwnProperty("highestIndexingType")) - switch (message.highestIndexingType) { - default: - return "highestIndexingType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - 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; - } - } - if (message.lookerColumnSpec != null && message.hasOwnProperty("lookerColumnSpec")) { - properties.systemSpec = 1; - { - var error = $root.google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.verify(message.lookerColumnSpec); - if (error) - return "lookerColumnSpec." + error; - } - } - if (message.rangeElementType != null && message.hasOwnProperty("rangeElementType")) { - var error = $root.google.cloud.datacatalog.v1.ColumnSchema.FieldElementType.verify(message.rangeElementType); - if (error) - return "rangeElementType." + error; - } - if (message.gcRule != null && message.hasOwnProperty("gcRule")) - if (!$util.isString(message.gcRule)) - return "gcRule: string expected"; - 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.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.ordinalPosition != null) - message.ordinalPosition = object.ordinalPosition | 0; - switch (object.highestIndexingType) { - default: - if (typeof object.highestIndexingType === "number") { - message.highestIndexingType = object.highestIndexingType; - break; - } - break; - case "INDEXING_TYPE_UNSPECIFIED": - case 0: - message.highestIndexingType = 0; - break; - case "INDEXING_TYPE_NONE": - case 1: - message.highestIndexingType = 1; - break; - case "INDEXING_TYPE_NON_UNIQUE": - case 2: - message.highestIndexingType = 2; - break; - case "INDEXING_TYPE_UNIQUE": - case 3: - message.highestIndexingType = 3; - break; - case "INDEXING_TYPE_PRIMARY_KEY": - case 4: - message.highestIndexingType = 4; - break; - } - 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]); - } - } - if (object.lookerColumnSpec != null) { - if (typeof object.lookerColumnSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1.ColumnSchema.lookerColumnSpec: object expected"); - message.lookerColumnSpec = $root.google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.fromObject(object.lookerColumnSpec); - } - if (object.rangeElementType != null) { - if (typeof object.rangeElementType !== "object") - throw TypeError(".google.cloud.datacatalog.v1.ColumnSchema.rangeElementType: object expected"); - message.rangeElementType = $root.google.cloud.datacatalog.v1.ColumnSchema.FieldElementType.fromObject(object.rangeElementType); - } - if (object.gcRule != null) - message.gcRule = String(object.gcRule); - 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 = ""; - object.defaultValue = ""; - object.ordinalPosition = 0; - object.highestIndexingType = options.enums === String ? "INDEXING_TYPE_UNSPECIFIED" : 0; - object.gcRule = ""; - object.rangeElementType = null; - } - 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); - } - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) - object.ordinalPosition = message.ordinalPosition; - if (message.highestIndexingType != null && message.hasOwnProperty("highestIndexingType")) - object.highestIndexingType = options.enums === String ? $root.google.cloud.datacatalog.v1.ColumnSchema.IndexingType[message.highestIndexingType] === undefined ? message.highestIndexingType : $root.google.cloud.datacatalog.v1.ColumnSchema.IndexingType[message.highestIndexingType] : message.highestIndexingType; - if (message.gcRule != null && message.hasOwnProperty("gcRule")) - object.gcRule = message.gcRule; - if (message.lookerColumnSpec != null && message.hasOwnProperty("lookerColumnSpec")) { - object.lookerColumnSpec = $root.google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.toObject(message.lookerColumnSpec, options); - if (options.oneofs) - object.systemSpec = "lookerColumnSpec"; - } - if (message.rangeElementType != null && message.hasOwnProperty("rangeElementType")) - object.rangeElementType = $root.google.cloud.datacatalog.v1.ColumnSchema.FieldElementType.toObject(message.rangeElementType, 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"; - }; - - /** - * IndexingType enum. - * @name google.cloud.datacatalog.v1.ColumnSchema.IndexingType - * @enum {number} - * @property {number} INDEXING_TYPE_UNSPECIFIED=0 INDEXING_TYPE_UNSPECIFIED value - * @property {number} INDEXING_TYPE_NONE=1 INDEXING_TYPE_NONE value - * @property {number} INDEXING_TYPE_NON_UNIQUE=2 INDEXING_TYPE_NON_UNIQUE value - * @property {number} INDEXING_TYPE_UNIQUE=3 INDEXING_TYPE_UNIQUE value - * @property {number} INDEXING_TYPE_PRIMARY_KEY=4 INDEXING_TYPE_PRIMARY_KEY value - */ - ColumnSchema.IndexingType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INDEXING_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INDEXING_TYPE_NONE"] = 1; - values[valuesById[2] = "INDEXING_TYPE_NON_UNIQUE"] = 2; - values[valuesById[3] = "INDEXING_TYPE_UNIQUE"] = 3; - values[valuesById[4] = "INDEXING_TYPE_PRIMARY_KEY"] = 4; - return values; - })(); - - ColumnSchema.LookerColumnSpec = (function() { - - /** - * Properties of a LookerColumnSpec. - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @interface ILookerColumnSpec - * @property {google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType|null} [type] LookerColumnSpec type - */ - - /** - * Constructs a new LookerColumnSpec. - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @classdesc Represents a LookerColumnSpec. - * @implements ILookerColumnSpec - * @constructor - * @param {google.cloud.datacatalog.v1.ColumnSchema.ILookerColumnSpec=} [properties] Properties to set - */ - function LookerColumnSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LookerColumnSpec type. - * @member {google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType} type - * @memberof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec - * @instance - */ - LookerColumnSpec.prototype.type = 0; - - /** - * Creates a new LookerColumnSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec - * @static - * @param {google.cloud.datacatalog.v1.ColumnSchema.ILookerColumnSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec} LookerColumnSpec instance - */ - LookerColumnSpec.create = function create(properties) { - return new LookerColumnSpec(properties); - }; - - /** - * Encodes the specified LookerColumnSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec - * @static - * @param {google.cloud.datacatalog.v1.ColumnSchema.ILookerColumnSpec} message LookerColumnSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LookerColumnSpec.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); - return writer; - }; - - /** - * Encodes the specified LookerColumnSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec - * @static - * @param {google.cloud.datacatalog.v1.ColumnSchema.ILookerColumnSpec} message LookerColumnSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LookerColumnSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LookerColumnSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec - * @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.LookerColumnSpec} LookerColumnSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LookerColumnSpec.decode = function decode(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.LookerColumnSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LookerColumnSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec} LookerColumnSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LookerColumnSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LookerColumnSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LookerColumnSpec.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: - case 3: - case 4: - case 5: - break; - } - return null; - }; - - /** - * Creates a LookerColumnSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec} LookerColumnSpec - */ - LookerColumnSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "LOOKER_COLUMN_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "DIMENSION": - case 1: - message.type = 1; - break; - case "DIMENSION_GROUP": - case 2: - message.type = 2; - break; - case "FILTER": - case 3: - message.type = 3; - break; - case "MEASURE": - case 4: - message.type = 4; - break; - case "PARAMETER": - case 5: - message.type = 5; - break; - } - return message; - }; - - /** - * Creates a plain object from a LookerColumnSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec - * @static - * @param {google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec} message LookerColumnSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LookerColumnSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.type = options.enums === String ? "LOOKER_COLUMN_TYPE_UNSPECIFIED" : 0; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType[message.type] === undefined ? message.type : $root.google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType[message.type] : message.type; - return object; - }; - - /** - * Converts this LookerColumnSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec - * @instance - * @returns {Object.} JSON object - */ - LookerColumnSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LookerColumnSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LookerColumnSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec"; - }; - - /** - * LookerColumnType enum. - * @name google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType - * @enum {number} - * @property {number} LOOKER_COLUMN_TYPE_UNSPECIFIED=0 LOOKER_COLUMN_TYPE_UNSPECIFIED value - * @property {number} DIMENSION=1 DIMENSION value - * @property {number} DIMENSION_GROUP=2 DIMENSION_GROUP value - * @property {number} FILTER=3 FILTER value - * @property {number} MEASURE=4 MEASURE value - * @property {number} PARAMETER=5 PARAMETER value - */ - LookerColumnSpec.LookerColumnType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOOKER_COLUMN_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DIMENSION"] = 1; - values[valuesById[2] = "DIMENSION_GROUP"] = 2; - values[valuesById[3] = "FILTER"] = 3; - values[valuesById[4] = "MEASURE"] = 4; - values[valuesById[5] = "PARAMETER"] = 5; - return values; - })(); - - return LookerColumnSpec; - })(); - - ColumnSchema.FieldElementType = (function() { - - /** - * Properties of a FieldElementType. - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @interface IFieldElementType - * @property {string|null} [type] FieldElementType type - */ - - /** - * Constructs a new FieldElementType. - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @classdesc Represents a FieldElementType. - * @implements IFieldElementType - * @constructor - * @param {google.cloud.datacatalog.v1.ColumnSchema.IFieldElementType=} [properties] Properties to set - */ - function FieldElementType(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldElementType type. - * @member {string} type - * @memberof google.cloud.datacatalog.v1.ColumnSchema.FieldElementType - * @instance - */ - FieldElementType.prototype.type = ""; - - /** - * Creates a new FieldElementType instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ColumnSchema.FieldElementType - * @static - * @param {google.cloud.datacatalog.v1.ColumnSchema.IFieldElementType=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ColumnSchema.FieldElementType} FieldElementType instance - */ - FieldElementType.create = function create(properties) { - return new FieldElementType(properties); - }; - - /** - * Encodes the specified FieldElementType message. Does not implicitly {@link google.cloud.datacatalog.v1.ColumnSchema.FieldElementType.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ColumnSchema.FieldElementType - * @static - * @param {google.cloud.datacatalog.v1.ColumnSchema.IFieldElementType} message FieldElementType message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldElementType.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); - return writer; - }; - - /** - * Encodes the specified FieldElementType message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ColumnSchema.FieldElementType.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ColumnSchema.FieldElementType - * @static - * @param {google.cloud.datacatalog.v1.ColumnSchema.IFieldElementType} message FieldElementType message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldElementType.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldElementType message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ColumnSchema.FieldElementType - * @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.FieldElementType} FieldElementType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldElementType.decode = function decode(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.FieldElementType(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldElementType message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ColumnSchema.FieldElementType - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ColumnSchema.FieldElementType} FieldElementType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldElementType.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldElementType message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ColumnSchema.FieldElementType - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldElementType.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"; - return null; - }; - - /** - * Creates a FieldElementType message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ColumnSchema.FieldElementType - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ColumnSchema.FieldElementType} FieldElementType - */ - FieldElementType.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ColumnSchema.FieldElementType) - return object; - var message = new $root.google.cloud.datacatalog.v1.ColumnSchema.FieldElementType(); - if (object.type != null) - message.type = String(object.type); - return message; - }; - - /** - * Creates a plain object from a FieldElementType message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ColumnSchema.FieldElementType - * @static - * @param {google.cloud.datacatalog.v1.ColumnSchema.FieldElementType} message FieldElementType - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldElementType.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.type = ""; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - return object; - }; - - /** - * Converts this FieldElementType to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ColumnSchema.FieldElementType - * @instance - * @returns {Object.} JSON object - */ - FieldElementType.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldElementType - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ColumnSchema.FieldElementType - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldElementType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ColumnSchema.FieldElementType"; - }; - - return FieldElementType; - })(); - - 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: - case 6: - case 7: - case 8: - case 9: - case 10: - 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; - case "CLOUD_SPANNER": - case 6: - message.integratedSystem = 6; - break; - case "CLOUD_BIGTABLE": - case 7: - message.integratedSystem = 7; - break; - case "CLOUD_SQL": - case 8: - message.integratedSystem = 8; - break; - case "LOOKER": - case 9: - message.integratedSystem = 9; - break; - case "VERTEX_AI": - case 10: - message.integratedSystem = 10; - 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 - * @property {google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus|null} [dataplexTransferStatus] Tag dataplexTransferStatus - */ - - /** - * 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; - - /** - * Tag dataplexTransferStatus. - * @member {google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus} dataplexTransferStatus - * @memberof google.cloud.datacatalog.v1.Tag - * @instance - */ - Tag.prototype.dataplexTransferStatus = 0; - - // 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); - if (message.dataplexTransferStatus != null && Object.hasOwnProperty.call(message, "dataplexTransferStatus")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.dataplexTransferStatus); - 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; - } - case 7: { - message.dataplexTransferStatus = reader.int32(); - 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; - } - } - if (message.dataplexTransferStatus != null && message.hasOwnProperty("dataplexTransferStatus")) - switch (message.dataplexTransferStatus) { - default: - return "dataplexTransferStatus: enum value expected"; - case 0: - case 1: - case 2: - break; - } - 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]]); - } - } - switch (object.dataplexTransferStatus) { - default: - if (typeof object.dataplexTransferStatus === "number") { - message.dataplexTransferStatus = object.dataplexTransferStatus; - break; - } - break; - case "DATAPLEX_TRANSFER_STATUS_UNSPECIFIED": - case 0: - message.dataplexTransferStatus = 0; - break; - case "MIGRATED": - case 1: - message.dataplexTransferStatus = 1; - break; - case "TRANSFERRED": - case 2: - message.dataplexTransferStatus = 2; - break; - } - 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 = ""; - object.dataplexTransferStatus = options.enums === String ? "DATAPLEX_TRANSFER_STATUS_UNSPECIFIED" : 0; - } - 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; - if (message.dataplexTransferStatus != null && message.hasOwnProperty("dataplexTransferStatus")) - object.dataplexTransferStatus = options.enums === String ? $root.google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus[message.dataplexTransferStatus] === undefined ? message.dataplexTransferStatus : $root.google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus[message.dataplexTransferStatus] : message.dataplexTransferStatus; - 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 - * @property {google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus|null} [dataplexTransferStatus] TagTemplate dataplexTransferStatus - */ - - /** - * 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; - - /** - * TagTemplate dataplexTransferStatus. - * @member {google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus} dataplexTransferStatus - * @memberof google.cloud.datacatalog.v1.TagTemplate - * @instance - */ - TagTemplate.prototype.dataplexTransferStatus = 0; - - /** - * 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); - if (message.dataplexTransferStatus != null && Object.hasOwnProperty.call(message, "dataplexTransferStatus")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.dataplexTransferStatus); - 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; - } - case 7: { - message.dataplexTransferStatus = reader.int32(); - 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; - } - } - if (message.dataplexTransferStatus != null && message.hasOwnProperty("dataplexTransferStatus")) - switch (message.dataplexTransferStatus) { - default: - return "dataplexTransferStatus: enum value expected"; - case 0: - case 1: - case 2: - break; - } - 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]]); - } - } - switch (object.dataplexTransferStatus) { - default: - if (typeof object.dataplexTransferStatus === "number") { - message.dataplexTransferStatus = object.dataplexTransferStatus; - break; - } - break; - case "DATAPLEX_TRANSFER_STATUS_UNSPECIFIED": - case 0: - message.dataplexTransferStatus = 0; - break; - case "MIGRATED": - case 1: - message.dataplexTransferStatus = 1; - break; - case "TRANSFERRED": - case 2: - message.dataplexTransferStatus = 2; - break; - } - 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; - object.dataplexTransferStatus = options.enums === String ? "DATAPLEX_TRANSFER_STATUS_UNSPECIFIED" : 0; - } - 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; - if (message.dataplexTransferStatus != null && message.hasOwnProperty("dataplexTransferStatus")) - object.dataplexTransferStatus = options.enums === String ? $root.google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus[message.dataplexTransferStatus] === undefined ? message.dataplexTransferStatus : $root.google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus[message.dataplexTransferStatus] : message.dataplexTransferStatus; - 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"; - }; - - /** - * DataplexTransferStatus enum. - * @name google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus - * @enum {number} - * @property {number} DATAPLEX_TRANSFER_STATUS_UNSPECIFIED=0 DATAPLEX_TRANSFER_STATUS_UNSPECIFIED value - * @property {number} MIGRATED=1 MIGRATED value - * @property {number} TRANSFERRED=2 TRANSFERRED value - */ - TagTemplate.DataplexTransferStatus = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATAPLEX_TRANSFER_STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "MIGRATED"] = 1; - values[valuesById[2] = "TRANSFERRED"] = 2; - return values; - })(); - - 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.CommonUsageStats = (function() { - - /** - * Properties of a CommonUsageStats. - * @memberof google.cloud.datacatalog.v1 - * @interface ICommonUsageStats - * @property {number|Long|null} [viewCount] CommonUsageStats viewCount - */ - - /** - * Constructs a new CommonUsageStats. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a CommonUsageStats. - * @implements ICommonUsageStats - * @constructor - * @param {google.cloud.datacatalog.v1.ICommonUsageStats=} [properties] Properties to set - */ - function CommonUsageStats(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CommonUsageStats viewCount. - * @member {number|Long|null|undefined} viewCount - * @memberof google.cloud.datacatalog.v1.CommonUsageStats - * @instance - */ - CommonUsageStats.prototype.viewCount = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CommonUsageStats _viewCount. - * @member {"viewCount"|undefined} _viewCount - * @memberof google.cloud.datacatalog.v1.CommonUsageStats - * @instance - */ - Object.defineProperty(CommonUsageStats.prototype, "_viewCount", { - get: $util.oneOfGetter($oneOfFields = ["viewCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CommonUsageStats instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.CommonUsageStats - * @static - * @param {google.cloud.datacatalog.v1.ICommonUsageStats=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.CommonUsageStats} CommonUsageStats instance - */ - CommonUsageStats.create = function create(properties) { - return new CommonUsageStats(properties); - }; - - /** - * Encodes the specified CommonUsageStats message. Does not implicitly {@link google.cloud.datacatalog.v1.CommonUsageStats.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.CommonUsageStats - * @static - * @param {google.cloud.datacatalog.v1.ICommonUsageStats} message CommonUsageStats message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonUsageStats.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.viewCount != null && Object.hasOwnProperty.call(message, "viewCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.viewCount); - return writer; - }; - - /** - * Encodes the specified CommonUsageStats message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CommonUsageStats.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.CommonUsageStats - * @static - * @param {google.cloud.datacatalog.v1.ICommonUsageStats} message CommonUsageStats message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonUsageStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CommonUsageStats message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.CommonUsageStats - * @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.CommonUsageStats} CommonUsageStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonUsageStats.decode = function decode(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.CommonUsageStats(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.viewCount = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CommonUsageStats message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.CommonUsageStats - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.CommonUsageStats} CommonUsageStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonUsageStats.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommonUsageStats message. - * @function verify - * @memberof google.cloud.datacatalog.v1.CommonUsageStats - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommonUsageStats.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.viewCount != null && message.hasOwnProperty("viewCount")) { - properties._viewCount = 1; - if (!$util.isInteger(message.viewCount) && !(message.viewCount && $util.isInteger(message.viewCount.low) && $util.isInteger(message.viewCount.high))) - return "viewCount: integer|Long expected"; - } - return null; - }; - - /** - * Creates a CommonUsageStats message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.CommonUsageStats - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.CommonUsageStats} CommonUsageStats - */ - CommonUsageStats.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.CommonUsageStats) - return object; - var message = new $root.google.cloud.datacatalog.v1.CommonUsageStats(); - if (object.viewCount != null) - if ($util.Long) - (message.viewCount = $util.Long.fromValue(object.viewCount)).unsigned = false; - else if (typeof object.viewCount === "string") - message.viewCount = parseInt(object.viewCount, 10); - else if (typeof object.viewCount === "number") - message.viewCount = object.viewCount; - else if (typeof object.viewCount === "object") - message.viewCount = new $util.LongBits(object.viewCount.low >>> 0, object.viewCount.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a CommonUsageStats message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.CommonUsageStats - * @static - * @param {google.cloud.datacatalog.v1.CommonUsageStats} message CommonUsageStats - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommonUsageStats.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.viewCount != null && message.hasOwnProperty("viewCount")) { - if (typeof message.viewCount === "number") - object.viewCount = options.longs === String ? String(message.viewCount) : message.viewCount; - else - object.viewCount = options.longs === String ? $util.Long.prototype.toString.call(message.viewCount) : options.longs === Number ? new $util.LongBits(message.viewCount.low >>> 0, message.viewCount.high >>> 0).toNumber() : message.viewCount; - if (options.oneofs) - object._viewCount = "viewCount"; - } - return object; - }; - - /** - * Converts this CommonUsageStats to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.CommonUsageStats - * @instance - * @returns {Object.} JSON object - */ - CommonUsageStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CommonUsageStats - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.CommonUsageStats - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CommonUsageStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.CommonUsageStats"; - }; - - return CommonUsageStats; - })(); - - 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 - * @property {Object.|null} [commonUsageWithinTimeRange] UsageSignal commonUsageWithinTimeRange - * @property {number|Long|null} [favoriteCount] UsageSignal favoriteCount - */ - - /** - * 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 = {}; - this.commonUsageWithinTimeRange = {}; - if (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; - - /** - * UsageSignal commonUsageWithinTimeRange. - * @member {Object.} commonUsageWithinTimeRange - * @memberof google.cloud.datacatalog.v1.UsageSignal - * @instance - */ - UsageSignal.prototype.commonUsageWithinTimeRange = $util.emptyObject; - - /** - * UsageSignal favoriteCount. - * @member {number|Long|null|undefined} favoriteCount - * @memberof google.cloud.datacatalog.v1.UsageSignal - * @instance - */ - UsageSignal.prototype.favoriteCount = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * UsageSignal _favoriteCount. - * @member {"favoriteCount"|undefined} _favoriteCount - * @memberof google.cloud.datacatalog.v1.UsageSignal - * @instance - */ - Object.defineProperty(UsageSignal.prototype, "_favoriteCount", { - get: $util.oneOfGetter($oneOfFields = ["favoriteCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * 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(); - } - if (message.commonUsageWithinTimeRange != null && Object.hasOwnProperty.call(message, "commonUsageWithinTimeRange")) - for (var keys = Object.keys(message.commonUsageWithinTimeRange), 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.CommonUsageStats.encode(message.commonUsageWithinTimeRange[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.favoriteCount != null && Object.hasOwnProperty.call(message, "favoriteCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.favoriteCount); - 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; - } - case 3: { - if (message.commonUsageWithinTimeRange === $util.emptyObject) - message.commonUsageWithinTimeRange = {}; - 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.CommonUsageStats.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.commonUsageWithinTimeRange[key] = value; - break; - } - case 4: { - message.favoriteCount = reader.int64(); - 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"; - var properties = {}; - 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; - } - } - if (message.commonUsageWithinTimeRange != null && message.hasOwnProperty("commonUsageWithinTimeRange")) { - if (!$util.isObject(message.commonUsageWithinTimeRange)) - return "commonUsageWithinTimeRange: object expected"; - var key = Object.keys(message.commonUsageWithinTimeRange); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.datacatalog.v1.CommonUsageStats.verify(message.commonUsageWithinTimeRange[key[i]]); - if (error) - return "commonUsageWithinTimeRange." + error; - } - } - if (message.favoriteCount != null && message.hasOwnProperty("favoriteCount")) { - properties._favoriteCount = 1; - if (!$util.isInteger(message.favoriteCount) && !(message.favoriteCount && $util.isInteger(message.favoriteCount.low) && $util.isInteger(message.favoriteCount.high))) - return "favoriteCount: integer|Long expected"; - } - 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]]); - } - } - if (object.commonUsageWithinTimeRange) { - if (typeof object.commonUsageWithinTimeRange !== "object") - throw TypeError(".google.cloud.datacatalog.v1.UsageSignal.commonUsageWithinTimeRange: object expected"); - message.commonUsageWithinTimeRange = {}; - for (var keys = Object.keys(object.commonUsageWithinTimeRange), i = 0; i < keys.length; ++i) { - if (typeof object.commonUsageWithinTimeRange[keys[i]] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.UsageSignal.commonUsageWithinTimeRange: object expected"); - message.commonUsageWithinTimeRange[keys[i]] = $root.google.cloud.datacatalog.v1.CommonUsageStats.fromObject(object.commonUsageWithinTimeRange[keys[i]]); - } - } - if (object.favoriteCount != null) - if ($util.Long) - (message.favoriteCount = $util.Long.fromValue(object.favoriteCount)).unsigned = false; - else if (typeof object.favoriteCount === "string") - message.favoriteCount = parseInt(object.favoriteCount, 10); - else if (typeof object.favoriteCount === "number") - message.favoriteCount = object.favoriteCount; - else if (typeof object.favoriteCount === "object") - message.favoriteCount = new $util.LongBits(object.favoriteCount.low >>> 0, object.favoriteCount.high >>> 0).toNumber(); - 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 = {}; - object.commonUsageWithinTimeRange = {}; - } - 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); - } - if (message.commonUsageWithinTimeRange && (keys2 = Object.keys(message.commonUsageWithinTimeRange)).length) { - object.commonUsageWithinTimeRange = {}; - for (var j = 0; j < keys2.length; ++j) - object.commonUsageWithinTimeRange[keys2[j]] = $root.google.cloud.datacatalog.v1.CommonUsageStats.toObject(message.commonUsageWithinTimeRange[keys2[j]], options); - } - if (message.favoriteCount != null && message.hasOwnProperty("favoriteCount")) { - if (typeof message.favoriteCount === "number") - object.favoriteCount = options.longs === String ? String(message.favoriteCount) : message.favoriteCount; - else - object.favoriteCount = options.longs === String ? $util.Long.prototype.toString.call(message.favoriteCount) : options.longs === Number ? new $util.LongBits(message.favoriteCount.low >>> 0, message.favoriteCount.high >>> 0).toNumber() : message.favoriteCount; - if (options.oneofs) - object._favoriteCount = "favoriteCount"; - } - 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.TaggedEntry = (function() { - - /** - * Properties of a TaggedEntry. - * @memberof google.cloud.datacatalog.v1 - * @interface ITaggedEntry - * @property {google.cloud.datacatalog.v1.IEntry|null} [v1Entry] TaggedEntry v1Entry - * @property {Array.|null} [presentTags] TaggedEntry presentTags - * @property {Array.|null} [absentTags] TaggedEntry absentTags - */ - - /** - * Constructs a new TaggedEntry. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a TaggedEntry. - * @implements ITaggedEntry - * @constructor - * @param {google.cloud.datacatalog.v1.ITaggedEntry=} [properties] Properties to set - */ - function TaggedEntry(properties) { - this.presentTags = []; - this.absentTags = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TaggedEntry v1Entry. - * @member {google.cloud.datacatalog.v1.IEntry|null|undefined} v1Entry - * @memberof google.cloud.datacatalog.v1.TaggedEntry - * @instance - */ - TaggedEntry.prototype.v1Entry = null; - - /** - * TaggedEntry presentTags. - * @member {Array.} presentTags - * @memberof google.cloud.datacatalog.v1.TaggedEntry - * @instance - */ - TaggedEntry.prototype.presentTags = $util.emptyArray; - - /** - * TaggedEntry absentTags. - * @member {Array.} absentTags - * @memberof google.cloud.datacatalog.v1.TaggedEntry - * @instance - */ - TaggedEntry.prototype.absentTags = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * TaggedEntry entry. - * @member {"v1Entry"|undefined} entry - * @memberof google.cloud.datacatalog.v1.TaggedEntry - * @instance - */ - Object.defineProperty(TaggedEntry.prototype, "entry", { - get: $util.oneOfGetter($oneOfFields = ["v1Entry"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TaggedEntry instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.TaggedEntry - * @static - * @param {google.cloud.datacatalog.v1.ITaggedEntry=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.TaggedEntry} TaggedEntry instance - */ - TaggedEntry.create = function create(properties) { - return new TaggedEntry(properties); - }; - - /** - * Encodes the specified TaggedEntry message. Does not implicitly {@link google.cloud.datacatalog.v1.TaggedEntry.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.TaggedEntry - * @static - * @param {google.cloud.datacatalog.v1.ITaggedEntry} message TaggedEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TaggedEntry.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.v1Entry != null && Object.hasOwnProperty.call(message, "v1Entry")) - $root.google.cloud.datacatalog.v1.Entry.encode(message.v1Entry, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.presentTags != null && message.presentTags.length) - for (var i = 0; i < message.presentTags.length; ++i) - $root.google.cloud.datacatalog.v1.Tag.encode(message.presentTags[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.absentTags != null && message.absentTags.length) - for (var i = 0; i < message.absentTags.length; ++i) - $root.google.cloud.datacatalog.v1.Tag.encode(message.absentTags[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TaggedEntry message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.TaggedEntry.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.TaggedEntry - * @static - * @param {google.cloud.datacatalog.v1.ITaggedEntry} message TaggedEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TaggedEntry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TaggedEntry message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.TaggedEntry - * @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.TaggedEntry} TaggedEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TaggedEntry.decode = function decode(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.TaggedEntry(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.v1Entry = $root.google.cloud.datacatalog.v1.Entry.decode(reader, reader.uint32()); - break; - } - case 2: { - if (!(message.presentTags && message.presentTags.length)) - message.presentTags = []; - message.presentTags.push($root.google.cloud.datacatalog.v1.Tag.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.absentTags && message.absentTags.length)) - message.absentTags = []; - message.absentTags.push($root.google.cloud.datacatalog.v1.Tag.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TaggedEntry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.TaggedEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.TaggedEntry} TaggedEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TaggedEntry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TaggedEntry message. - * @function verify - * @memberof google.cloud.datacatalog.v1.TaggedEntry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TaggedEntry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.v1Entry != null && message.hasOwnProperty("v1Entry")) { - properties.entry = 1; - { - var error = $root.google.cloud.datacatalog.v1.Entry.verify(message.v1Entry); - if (error) - return "v1Entry." + error; - } - } - if (message.presentTags != null && message.hasOwnProperty("presentTags")) { - if (!Array.isArray(message.presentTags)) - return "presentTags: array expected"; - for (var i = 0; i < message.presentTags.length; ++i) { - var error = $root.google.cloud.datacatalog.v1.Tag.verify(message.presentTags[i]); - if (error) - return "presentTags." + error; - } - } - if (message.absentTags != null && message.hasOwnProperty("absentTags")) { - if (!Array.isArray(message.absentTags)) - return "absentTags: array expected"; - for (var i = 0; i < message.absentTags.length; ++i) { - var error = $root.google.cloud.datacatalog.v1.Tag.verify(message.absentTags[i]); - if (error) - return "absentTags." + error; - } - } - return null; - }; - - /** - * Creates a TaggedEntry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.TaggedEntry - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.TaggedEntry} TaggedEntry - */ - TaggedEntry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.TaggedEntry) - return object; - var message = new $root.google.cloud.datacatalog.v1.TaggedEntry(); - if (object.v1Entry != null) { - if (typeof object.v1Entry !== "object") - throw TypeError(".google.cloud.datacatalog.v1.TaggedEntry.v1Entry: object expected"); - message.v1Entry = $root.google.cloud.datacatalog.v1.Entry.fromObject(object.v1Entry); - } - if (object.presentTags) { - if (!Array.isArray(object.presentTags)) - throw TypeError(".google.cloud.datacatalog.v1.TaggedEntry.presentTags: array expected"); - message.presentTags = []; - for (var i = 0; i < object.presentTags.length; ++i) { - if (typeof object.presentTags[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.TaggedEntry.presentTags: object expected"); - message.presentTags[i] = $root.google.cloud.datacatalog.v1.Tag.fromObject(object.presentTags[i]); - } - } - if (object.absentTags) { - if (!Array.isArray(object.absentTags)) - throw TypeError(".google.cloud.datacatalog.v1.TaggedEntry.absentTags: array expected"); - message.absentTags = []; - for (var i = 0; i < object.absentTags.length; ++i) { - if (typeof object.absentTags[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.TaggedEntry.absentTags: object expected"); - message.absentTags[i] = $root.google.cloud.datacatalog.v1.Tag.fromObject(object.absentTags[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a TaggedEntry message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.TaggedEntry - * @static - * @param {google.cloud.datacatalog.v1.TaggedEntry} message TaggedEntry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TaggedEntry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.presentTags = []; - object.absentTags = []; - } - if (message.v1Entry != null && message.hasOwnProperty("v1Entry")) { - object.v1Entry = $root.google.cloud.datacatalog.v1.Entry.toObject(message.v1Entry, options); - if (options.oneofs) - object.entry = "v1Entry"; - } - if (message.presentTags && message.presentTags.length) { - object.presentTags = []; - for (var j = 0; j < message.presentTags.length; ++j) - object.presentTags[j] = $root.google.cloud.datacatalog.v1.Tag.toObject(message.presentTags[j], options); - } - if (message.absentTags && message.absentTags.length) { - object.absentTags = []; - for (var j = 0; j < message.absentTags.length; ++j) - object.absentTags[j] = $root.google.cloud.datacatalog.v1.Tag.toObject(message.absentTags[j], options); - } - return object; - }; - - /** - * Converts this TaggedEntry to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.TaggedEntry - * @instance - * @returns {Object.} JSON object - */ - TaggedEntry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TaggedEntry - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.TaggedEntry - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TaggedEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.TaggedEntry"; - }; - - return TaggedEntry; - })(); - - v1.DumpItem = (function() { - - /** - * Properties of a DumpItem. - * @memberof google.cloud.datacatalog.v1 - * @interface IDumpItem - * @property {google.cloud.datacatalog.v1.ITaggedEntry|null} [taggedEntry] DumpItem taggedEntry - */ - - /** - * Constructs a new DumpItem. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a DumpItem. - * @implements IDumpItem - * @constructor - * @param {google.cloud.datacatalog.v1.IDumpItem=} [properties] Properties to set - */ - function DumpItem(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DumpItem taggedEntry. - * @member {google.cloud.datacatalog.v1.ITaggedEntry|null|undefined} taggedEntry - * @memberof google.cloud.datacatalog.v1.DumpItem - * @instance - */ - DumpItem.prototype.taggedEntry = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DumpItem item. - * @member {"taggedEntry"|undefined} item - * @memberof google.cloud.datacatalog.v1.DumpItem - * @instance - */ - Object.defineProperty(DumpItem.prototype, "item", { - get: $util.oneOfGetter($oneOfFields = ["taggedEntry"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DumpItem instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.DumpItem - * @static - * @param {google.cloud.datacatalog.v1.IDumpItem=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.DumpItem} DumpItem instance - */ - DumpItem.create = function create(properties) { - return new DumpItem(properties); - }; - - /** - * Encodes the specified DumpItem message. Does not implicitly {@link google.cloud.datacatalog.v1.DumpItem.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.DumpItem - * @static - * @param {google.cloud.datacatalog.v1.IDumpItem} message DumpItem message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DumpItem.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.taggedEntry != null && Object.hasOwnProperty.call(message, "taggedEntry")) - $root.google.cloud.datacatalog.v1.TaggedEntry.encode(message.taggedEntry, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DumpItem message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DumpItem.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.DumpItem - * @static - * @param {google.cloud.datacatalog.v1.IDumpItem} message DumpItem message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DumpItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DumpItem message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.DumpItem - * @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.DumpItem} DumpItem - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DumpItem.decode = function decode(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.DumpItem(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.taggedEntry = $root.google.cloud.datacatalog.v1.TaggedEntry.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DumpItem message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.DumpItem - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.DumpItem} DumpItem - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DumpItem.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DumpItem message. - * @function verify - * @memberof google.cloud.datacatalog.v1.DumpItem - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DumpItem.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.taggedEntry != null && message.hasOwnProperty("taggedEntry")) { - properties.item = 1; - { - var error = $root.google.cloud.datacatalog.v1.TaggedEntry.verify(message.taggedEntry); - if (error) - return "taggedEntry." + error; - } - } - return null; - }; - - /** - * Creates a DumpItem message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.DumpItem - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.DumpItem} DumpItem - */ - DumpItem.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.DumpItem) - return object; - var message = new $root.google.cloud.datacatalog.v1.DumpItem(); - if (object.taggedEntry != null) { - if (typeof object.taggedEntry !== "object") - throw TypeError(".google.cloud.datacatalog.v1.DumpItem.taggedEntry: object expected"); - message.taggedEntry = $root.google.cloud.datacatalog.v1.TaggedEntry.fromObject(object.taggedEntry); - } - return message; - }; - - /** - * Creates a plain object from a DumpItem message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.DumpItem - * @static - * @param {google.cloud.datacatalog.v1.DumpItem} message DumpItem - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DumpItem.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.taggedEntry != null && message.hasOwnProperty("taggedEntry")) { - object.taggedEntry = $root.google.cloud.datacatalog.v1.TaggedEntry.toObject(message.taggedEntry, options); - if (options.oneofs) - object.item = "taggedEntry"; - } - return object; - }; - - /** - * Converts this DumpItem to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.DumpItem - * @instance - * @returns {Object.} JSON object - */ - DumpItem.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DumpItem - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.DumpItem - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DumpItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.DumpItem"; - }; - - return DumpItem; - })(); - - 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 - * @property {google.cloud.datacatalog.v1.Taxonomy.IService|null} [service] Taxonomy service - */ - - /** - * 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; - - /** - * Taxonomy service. - * @member {google.cloud.datacatalog.v1.Taxonomy.IService|null|undefined} service - * @memberof google.cloud.datacatalog.v1.Taxonomy - * @instance - */ - Taxonomy.prototype.service = null; - - /** - * 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(); - } - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - $root.google.cloud.datacatalog.v1.Taxonomy.Service.encode(message.service, writer.uint32(/* id 7, wireType 2 =*/58).fork()).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; - } - case 7: { - message.service = $root.google.cloud.datacatalog.v1.Taxonomy.Service.decode(reader, reader.uint32()); - 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; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - var error = $root.google.cloud.datacatalog.v1.Taxonomy.Service.verify(message.service); - if (error) - return "service." + error; - } - 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; - } - } - if (object.service != null) { - if (typeof object.service !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Taxonomy.service: object expected"); - message.service = $root.google.cloud.datacatalog.v1.Taxonomy.Service.fromObject(object.service); - } - 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; - object.service = 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]; - } - if (message.service != null && message.hasOwnProperty("service")) - object.service = $root.google.cloud.datacatalog.v1.Taxonomy.Service.toObject(message.service, options); - 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; - })(); - - Taxonomy.Service = (function() { - - /** - * Properties of a Service. - * @memberof google.cloud.datacatalog.v1.Taxonomy - * @interface IService - * @property {google.cloud.datacatalog.v1.ManagingSystem|null} [name] Service name - * @property {string|null} [identity] Service identity - */ - - /** - * Constructs a new Service. - * @memberof google.cloud.datacatalog.v1.Taxonomy - * @classdesc Represents a Service. - * @implements IService - * @constructor - * @param {google.cloud.datacatalog.v1.Taxonomy.IService=} [properties] Properties to set - */ - function Service(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Service name. - * @member {google.cloud.datacatalog.v1.ManagingSystem} name - * @memberof google.cloud.datacatalog.v1.Taxonomy.Service - * @instance - */ - Service.prototype.name = 0; - - /** - * Service identity. - * @member {string} identity - * @memberof google.cloud.datacatalog.v1.Taxonomy.Service - * @instance - */ - Service.prototype.identity = ""; - - /** - * Creates a new Service instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.Taxonomy.Service - * @static - * @param {google.cloud.datacatalog.v1.Taxonomy.IService=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.Taxonomy.Service} Service instance - */ - Service.create = function create(properties) { - return new Service(properties); - }; - - /** - * Encodes the specified Service message. Does not implicitly {@link google.cloud.datacatalog.v1.Taxonomy.Service.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.Taxonomy.Service - * @static - * @param {google.cloud.datacatalog.v1.Taxonomy.IService} message Service message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Service.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.name); - if (message.identity != null && Object.hasOwnProperty.call(message, "identity")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.identity); - return writer; - }; - - /** - * Encodes the specified Service message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.Taxonomy.Service.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.Taxonomy.Service - * @static - * @param {google.cloud.datacatalog.v1.Taxonomy.IService} message Service message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Service.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Service message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.Taxonomy.Service - * @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.Service} Service - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Service.decode = function decode(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.Service(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.int32(); - break; - } - case 2: { - message.identity = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Service message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.Taxonomy.Service - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.Taxonomy.Service} Service - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Service.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Service message. - * @function verify - * @memberof google.cloud.datacatalog.v1.Taxonomy.Service - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Service.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - switch (message.name) { - default: - return "name: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.identity != null && message.hasOwnProperty("identity")) - if (!$util.isString(message.identity)) - return "identity: string expected"; - return null; - }; - - /** - * Creates a Service message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.Taxonomy.Service - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.Taxonomy.Service} Service - */ - Service.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.Taxonomy.Service) - return object; - var message = new $root.google.cloud.datacatalog.v1.Taxonomy.Service(); - switch (object.name) { - default: - if (typeof object.name === "number") { - message.name = object.name; - break; - } - break; - case "MANAGING_SYSTEM_UNSPECIFIED": - case 0: - message.name = 0; - break; - case "MANAGING_SYSTEM_DATAPLEX": - case 1: - message.name = 1; - break; - case "MANAGING_SYSTEM_OTHER": - case 2: - message.name = 2; - break; - } - if (object.identity != null) - message.identity = String(object.identity); - return message; - }; - - /** - * Creates a plain object from a Service message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.Taxonomy.Service - * @static - * @param {google.cloud.datacatalog.v1.Taxonomy.Service} message Service - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Service.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = options.enums === String ? "MANAGING_SYSTEM_UNSPECIFIED" : 0; - object.identity = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = options.enums === String ? $root.google.cloud.datacatalog.v1.ManagingSystem[message.name] === undefined ? message.name : $root.google.cloud.datacatalog.v1.ManagingSystem[message.name] : message.name; - if (message.identity != null && message.hasOwnProperty("identity")) - object.identity = message.identity; - return object; - }; - - /** - * Converts this Service to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.Taxonomy.Service - * @instance - * @returns {Object.} JSON object - */ - Service.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Service - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.Taxonomy.Service - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Service.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.Taxonomy.Service"; - }; - - return Service; - })(); - - 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 - * @property {string|null} [filter] ListTaxonomiesRequest filter - */ - - /** - * 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 = ""; - - /** - * ListTaxonomiesRequest filter. - * @member {string} filter - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesRequest - * @instance - */ - ListTaxonomiesRequest.prototype.filter = ""; - - /** - * 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); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - 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; - } - case 4: { - message.filter = 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"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: 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); - if (object.filter != null) - message.filter = String(object.filter); - 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 = ""; - object.filter = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; - - /** - * Converts this 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; - })(); - - 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 - * @property {number} IDENTIFIER=8 IDENTIFIER value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - values[valuesById[8] = "IDENTIFIER"] = 8; - return values; - })(); - - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - this.rules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fullyDecodeReservedExpansion = false; - - /** - * Creates a new Http instance using the specified properties. - * @function create - * @memberof google.api.Http - * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance - */ - Http.create = function create(properties) { - return new Http(properties); - }; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); - return writer; - }; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.fullyDecodeReservedExpansion = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; - return null; - }; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - return message; - }; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; - return object; - }; - - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Http - * @function getTypeUrl - * @memberof google.api.Http - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Http"; - }; - - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; - - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; - - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new HttpRule instance using the specified properties. - * @function create - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance - */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); - }; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); - return writer; - }; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.get = reader.string(); - break; - } - case 3: { - message.put = reader.string(); - break; - } - case 4: { - message.post = reader.string(); - break; - } - case 5: { - message["delete"] = reader.string(); - break; - } - case 6: { - message.patch = reader.string(); - break; - } - case 8: { - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - } - case 7: { - message.body = reader.string(); - break; - } - case 12: { - message.responseBody = reader.string(); - break; - } - case 11: { - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; - } - } - return null; - }; - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) - return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.HttpRule - * @static - * @param {google.api.HttpRule} message HttpRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); - } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; - return object; - }; - - /** - * Converts this HttpRule to JSON. - * @function toJSON - * @memberof google.api.HttpRule - * @instance - * @returns {Object.} JSON object - */ - HttpRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HttpRule - * @function getTypeUrl - * @memberof google.api.HttpRule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.HttpRule"; - }; - - return HttpRule; - })(); - - api.CustomHttpPattern = (function() { - - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ - - /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern - * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - */ - function CustomHttpPattern(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @function create - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance - */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); - }; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encode - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - return writer; - }; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.kind = reader.string(); - break; - } - case 2: { - message.path = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomHttpPattern message. - * @function verify - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomHttpPattern.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - return null; - }; - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) - return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); - return message; - }; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomHttpPattern.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; - } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - return object; - }; - - /** - * Converts this CustomHttpPattern to JSON. - * @function toJSON - * @memberof google.api.CustomHttpPattern - * @instance - * @returns {Object.} JSON object - */ - CustomHttpPattern.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomHttpPattern - * @function getTypeUrl - * @memberof google.api.CustomHttpPattern - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CustomHttpPattern"; - }; - - return CustomHttpPattern; - })(); - - api.CommonLanguageSettings = (function() { - - /** - * Properties of a CommonLanguageSettings. - * @memberof google.api - * @interface ICommonLanguageSettings - * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri - * @property {Array.|null} [destinations] CommonLanguageSettings destinations - */ - - /** - * Constructs a new CommonLanguageSettings. - * @memberof google.api - * @classdesc Represents a CommonLanguageSettings. - * @implements ICommonLanguageSettings - * @constructor - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - */ - function CommonLanguageSettings(properties) { - this.destinations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CommonLanguageSettings referenceDocsUri. - * @member {string} referenceDocsUri - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.referenceDocsUri = ""; - - /** - * CommonLanguageSettings destinations. - * @member {Array.} destinations - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.destinations = $util.emptyArray; - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @function create - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance - */ - CommonLanguageSettings.create = function create(properties) { - return new CommonLanguageSettings(properties); - }; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); - if (message.destinations != null && message.destinations.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.destinations.length; ++i) - writer.int32(message.destinations[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.referenceDocsUri = reader.string(); - break; - } - case 2: { - if (!(message.destinations && message.destinations.length)) - message.destinations = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.destinations.push(reader.int32()); - } else - message.destinations.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommonLanguageSettings message. - * @function verify - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommonLanguageSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - if (!$util.isString(message.referenceDocsUri)) - return "referenceDocsUri: string expected"; - if (message.destinations != null && message.hasOwnProperty("destinations")) { - if (!Array.isArray(message.destinations)) - return "destinations: array expected"; - for (var i = 0; i < message.destinations.length; ++i) - switch (message.destinations[i]) { - default: - return "destinations: enum value[] expected"; - case 0: - case 10: - case 20: - break; - } - } - return null; - }; - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - */ - CommonLanguageSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CommonLanguageSettings) - return object; - var message = new $root.google.api.CommonLanguageSettings(); - if (object.referenceDocsUri != null) - message.referenceDocsUri = String(object.referenceDocsUri); - if (object.destinations) { - if (!Array.isArray(object.destinations)) - throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); - message.destinations = []; - for (var i = 0; i < object.destinations.length; ++i) - switch (object.destinations[i]) { - default: - if (typeof object.destinations[i] === "number") { - message.destinations[i] = object.destinations[i]; - break; - } - case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": - case 0: - message.destinations[i] = 0; - break; - case "GITHUB": - case 10: - message.destinations[i] = 10; - break; - case "PACKAGE_MANAGER": - case 20: - message.destinations[i] = 20; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommonLanguageSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.destinations = []; - if (options.defaults) - object.referenceDocsUri = ""; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - object.referenceDocsUri = message.referenceDocsUri; - if (message.destinations && message.destinations.length) { - object.destinations = []; - for (var j = 0; j < message.destinations.length; ++j) - object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; - } - return object; - }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @function toJSON - * @memberof google.api.CommonLanguageSettings - * @instance - * @returns {Object.} JSON object - */ - CommonLanguageSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CommonLanguageSettings - * @function getTypeUrl - * @memberof google.api.CommonLanguageSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CommonLanguageSettings"; - }; - - return CommonLanguageSettings; - })(); - - api.ClientLibrarySettings = (function() { - - /** - * Properties of a ClientLibrarySettings. - * @memberof google.api - * @interface IClientLibrarySettings - * @property {string|null} [version] ClientLibrarySettings version - * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage - * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums - * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings - * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings - * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings - * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings - * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings - * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings - * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings - * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings - */ - - /** - * Constructs a new ClientLibrarySettings. - * @memberof google.api - * @classdesc Represents a ClientLibrarySettings. - * @implements IClientLibrarySettings - * @constructor - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - */ - function ClientLibrarySettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientLibrarySettings version. - * @member {string} version - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.version = ""; - - /** - * ClientLibrarySettings launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.launchStage = 0; - - /** - * ClientLibrarySettings restNumericEnums. - * @member {boolean} restNumericEnums - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.restNumericEnums = false; - - /** - * ClientLibrarySettings javaSettings. - * @member {google.api.IJavaSettings|null|undefined} javaSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.javaSettings = null; - - /** - * ClientLibrarySettings cppSettings. - * @member {google.api.ICppSettings|null|undefined} cppSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.cppSettings = null; - - /** - * ClientLibrarySettings phpSettings. - * @member {google.api.IPhpSettings|null|undefined} phpSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.phpSettings = null; - - /** - * ClientLibrarySettings pythonSettings. - * @member {google.api.IPythonSettings|null|undefined} pythonSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.pythonSettings = null; - - /** - * ClientLibrarySettings nodeSettings. - * @member {google.api.INodeSettings|null|undefined} nodeSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.nodeSettings = null; - - /** - * ClientLibrarySettings dotnetSettings. - * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.dotnetSettings = null; - - /** - * ClientLibrarySettings rubySettings. - * @member {google.api.IRubySettings|null|undefined} rubySettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.rubySettings = null; - - /** - * ClientLibrarySettings goSettings. - * @member {google.api.IGoSettings|null|undefined} goSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.goSettings = null; - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @function create - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance - */ - ClientLibrarySettings.create = function create(properties) { - return new ClientLibrarySettings(properties); - }; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); - if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); - if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) - $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) - $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) - $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) - $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) - $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) - $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) - $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) - $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - case 2: { - message.launchStage = reader.int32(); - break; - } - case 3: { - message.restNumericEnums = reader.bool(); - break; - } - case 21: { - message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); - break; - } - case 22: { - message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); - break; - } - case 23: { - message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); - break; - } - case 24: { - message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); - break; - } - case 25: { - message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); - break; - } - case 26: { - message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); - break; - } - case 27: { - message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); - break; - } - case 28: { - message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientLibrarySettings message. - * @function verify - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientLibrarySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 6: - case 7: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - if (typeof message.restNumericEnums !== "boolean") - return "restNumericEnums: boolean expected"; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { - var error = $root.google.api.JavaSettings.verify(message.javaSettings); - if (error) - return "javaSettings." + error; - } - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { - var error = $root.google.api.CppSettings.verify(message.cppSettings); - if (error) - return "cppSettings." + error; - } - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { - var error = $root.google.api.PhpSettings.verify(message.phpSettings); - if (error) - return "phpSettings." + error; - } - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { - var error = $root.google.api.PythonSettings.verify(message.pythonSettings); - if (error) - return "pythonSettings." + error; - } - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { - var error = $root.google.api.NodeSettings.verify(message.nodeSettings); - if (error) - return "nodeSettings." + error; - } - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { - var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); - if (error) - return "dotnetSettings." + error; - } - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { - var error = $root.google.api.RubySettings.verify(message.rubySettings); - if (error) - return "rubySettings." + error; - } - if (message.goSettings != null && message.hasOwnProperty("goSettings")) { - var error = $root.google.api.GoSettings.verify(message.goSettings); - if (error) - return "goSettings." + error; - } - return null; - }; - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - */ - ClientLibrarySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ClientLibrarySettings) - return object; - var message = new $root.google.api.ClientLibrarySettings(); - if (object.version != null) - message.version = String(object.version); - switch (object.launchStage) { - default: - if (typeof object.launchStage === "number") { - message.launchStage = object.launchStage; - break; - } - break; - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "UNIMPLEMENTED": - case 6: - message.launchStage = 6; - break; - case "PRELAUNCH": - case 7: - message.launchStage = 7; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } - if (object.restNumericEnums != null) - message.restNumericEnums = Boolean(object.restNumericEnums); - if (object.javaSettings != null) { - if (typeof object.javaSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); - message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); - } - if (object.cppSettings != null) { - if (typeof object.cppSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); - message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); - } - if (object.phpSettings != null) { - if (typeof object.phpSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); - message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); - } - if (object.pythonSettings != null) { - if (typeof object.pythonSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); - message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); - } - if (object.nodeSettings != null) { - if (typeof object.nodeSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); - message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); - } - if (object.dotnetSettings != null) { - if (typeof object.dotnetSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); - message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); - } - if (object.rubySettings != null) { - if (typeof object.rubySettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); - message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); - } - if (object.goSettings != null) { - if (typeof object.goSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); - message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); - } - return message; - }; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientLibrarySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = ""; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - object.restNumericEnums = false; - object.javaSettings = null; - object.cppSettings = null; - object.phpSettings = null; - object.pythonSettings = null; - object.nodeSettings = null; - object.dotnetSettings = null; - object.rubySettings = null; - object.goSettings = null; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - object.restNumericEnums = message.restNumericEnums; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) - object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) - object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) - object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) - object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) - object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) - object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) - object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); - if (message.goSettings != null && message.hasOwnProperty("goSettings")) - object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); - return object; - }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @function toJSON - * @memberof google.api.ClientLibrarySettings - * @instance - * @returns {Object.} JSON object - */ - ClientLibrarySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClientLibrarySettings - * @function getTypeUrl - * @memberof google.api.ClientLibrarySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ClientLibrarySettings"; - }; - - return ClientLibrarySettings; - })(); - - api.Publishing = (function() { - - /** - * Properties of a Publishing. - * @memberof google.api - * @interface IPublishing - * @property {Array.|null} [methodSettings] Publishing methodSettings - * @property {string|null} [newIssueUri] Publishing newIssueUri - * @property {string|null} [documentationUri] Publishing documentationUri - * @property {string|null} [apiShortName] Publishing apiShortName - * @property {string|null} [githubLabel] Publishing githubLabel - * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams - * @property {string|null} [docTagPrefix] Publishing docTagPrefix - * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization - * @property {Array.|null} [librarySettings] Publishing librarySettings - * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri - * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri - */ - - /** - * Constructs a new Publishing. - * @memberof google.api - * @classdesc Represents a Publishing. - * @implements IPublishing - * @constructor - * @param {google.api.IPublishing=} [properties] Properties to set - */ - function Publishing(properties) { - this.methodSettings = []; - this.codeownerGithubTeams = []; - this.librarySettings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Publishing methodSettings. - * @member {Array.} methodSettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.methodSettings = $util.emptyArray; - - /** - * Publishing newIssueUri. - * @member {string} newIssueUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.newIssueUri = ""; - - /** - * Publishing documentationUri. - * @member {string} documentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.documentationUri = ""; - - /** - * Publishing apiShortName. - * @member {string} apiShortName - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.apiShortName = ""; - - /** - * Publishing githubLabel. - * @member {string} githubLabel - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.githubLabel = ""; - - /** - * Publishing codeownerGithubTeams. - * @member {Array.} codeownerGithubTeams - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.codeownerGithubTeams = $util.emptyArray; - - /** - * Publishing docTagPrefix. - * @member {string} docTagPrefix - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.docTagPrefix = ""; - - /** - * Publishing organization. - * @member {google.api.ClientLibraryOrganization} organization - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.organization = 0; - - /** - * Publishing librarySettings. - * @member {Array.} librarySettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.librarySettings = $util.emptyArray; - - /** - * Publishing protoReferenceDocumentationUri. - * @member {string} protoReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.protoReferenceDocumentationUri = ""; - - /** - * Publishing restReferenceDocumentationUri. - * @member {string} restReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.restReferenceDocumentationUri = ""; - - /** - * Creates a new Publishing instance using the specified properties. - * @function create - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing=} [properties] Properties to set - * @returns {google.api.Publishing} Publishing instance - */ - Publishing.create = function create(properties) { - return new Publishing(properties); - }; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encode - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.methodSettings != null && message.methodSettings.length) - for (var i = 0; i < message.methodSettings.length; ++i) - $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); - if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); - if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) - writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); - if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) - writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); - if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); - if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) - writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); - if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) - writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); - if (message.librarySettings != null && message.librarySettings.length) - for (var i = 0; i < message.librarySettings.length; ++i) - $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); - if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) - writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); - if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) - writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); - return writer; - }; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @function decode - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.methodSettings && message.methodSettings.length)) - message.methodSettings = []; - message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); - break; - } - case 101: { - message.newIssueUri = reader.string(); - break; - } - case 102: { - message.documentationUri = reader.string(); - break; - } - case 103: { - message.apiShortName = reader.string(); - break; - } - case 104: { - message.githubLabel = reader.string(); - break; - } - case 105: { - if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) - message.codeownerGithubTeams = []; - message.codeownerGithubTeams.push(reader.string()); - break; - } - case 106: { - message.docTagPrefix = reader.string(); - break; - } - case 107: { - message.organization = reader.int32(); - break; - } - case 109: { - if (!(message.librarySettings && message.librarySettings.length)) - message.librarySettings = []; - message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); - break; - } - case 110: { - message.protoReferenceDocumentationUri = reader.string(); - break; - } - case 111: { - message.restReferenceDocumentationUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Publishing message. - * @function verify - * @memberof google.api.Publishing - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Publishing.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { - if (!Array.isArray(message.methodSettings)) - return "methodSettings: array expected"; - for (var i = 0; i < message.methodSettings.length; ++i) { - var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); - if (error) - return "methodSettings." + error; - } - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - if (!$util.isString(message.newIssueUri)) - return "newIssueUri: string expected"; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - if (!$util.isString(message.documentationUri)) - return "documentationUri: string expected"; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - if (!$util.isString(message.apiShortName)) - return "apiShortName: string expected"; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - if (!$util.isString(message.githubLabel)) - return "githubLabel: string expected"; - if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { - if (!Array.isArray(message.codeownerGithubTeams)) - return "codeownerGithubTeams: array expected"; - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - if (!$util.isString(message.codeownerGithubTeams[i])) - return "codeownerGithubTeams: string[] expected"; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - if (!$util.isString(message.docTagPrefix)) - return "docTagPrefix: string expected"; - if (message.organization != null && message.hasOwnProperty("organization")) - switch (message.organization) { - default: - return "organization: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { - if (!Array.isArray(message.librarySettings)) - return "librarySettings: array expected"; - for (var i = 0; i < message.librarySettings.length; ++i) { - var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); - if (error) - return "librarySettings." + error; - } - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - if (!$util.isString(message.protoReferenceDocumentationUri)) - return "protoReferenceDocumentationUri: string expected"; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - if (!$util.isString(message.restReferenceDocumentationUri)) - return "restReferenceDocumentationUri: string expected"; - return null; - }; - - /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Publishing - * @static - * @param {Object.} object Plain object - * @returns {google.api.Publishing} Publishing - */ - Publishing.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Publishing) - return object; - var message = new $root.google.api.Publishing(); - if (object.methodSettings) { - if (!Array.isArray(object.methodSettings)) - throw TypeError(".google.api.Publishing.methodSettings: array expected"); - message.methodSettings = []; - for (var i = 0; i < object.methodSettings.length; ++i) { - if (typeof object.methodSettings[i] !== "object") - throw TypeError(".google.api.Publishing.methodSettings: object expected"); - message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); - } - } - if (object.newIssueUri != null) - message.newIssueUri = String(object.newIssueUri); - if (object.documentationUri != null) - message.documentationUri = String(object.documentationUri); - if (object.apiShortName != null) - message.apiShortName = String(object.apiShortName); - if (object.githubLabel != null) - message.githubLabel = String(object.githubLabel); - if (object.codeownerGithubTeams) { - if (!Array.isArray(object.codeownerGithubTeams)) - throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); - message.codeownerGithubTeams = []; - for (var i = 0; i < object.codeownerGithubTeams.length; ++i) - message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); - } - if (object.docTagPrefix != null) - message.docTagPrefix = String(object.docTagPrefix); - switch (object.organization) { - default: - if (typeof object.organization === "number") { - message.organization = object.organization; - break; - } - break; - case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": - case 0: - message.organization = 0; - break; - case "CLOUD": - case 1: - message.organization = 1; - break; - case "ADS": - case 2: - message.organization = 2; - break; - case "PHOTOS": - case 3: - message.organization = 3; - break; - case "STREET_VIEW": - case 4: - message.organization = 4; - break; - case "SHOPPING": - case 5: - message.organization = 5; - break; - case "GEO": - case 6: - message.organization = 6; - break; - case "GENERATIVE_AI": - case 7: - message.organization = 7; - break; - } - if (object.librarySettings) { - if (!Array.isArray(object.librarySettings)) - throw TypeError(".google.api.Publishing.librarySettings: array expected"); - message.librarySettings = []; - for (var i = 0; i < object.librarySettings.length; ++i) { - if (typeof object.librarySettings[i] !== "object") - throw TypeError(".google.api.Publishing.librarySettings: object expected"); - message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); - } - } - if (object.protoReferenceDocumentationUri != null) - message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); - if (object.restReferenceDocumentationUri != null) - message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); - return message; - }; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Publishing - * @static - * @param {google.api.Publishing} message Publishing - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Publishing.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.methodSettings = []; - object.codeownerGithubTeams = []; - object.librarySettings = []; - } - if (options.defaults) { - object.newIssueUri = ""; - object.documentationUri = ""; - object.apiShortName = ""; - object.githubLabel = ""; - object.docTagPrefix = ""; - object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; - object.protoReferenceDocumentationUri = ""; - object.restReferenceDocumentationUri = ""; - } - if (message.methodSettings && message.methodSettings.length) { - object.methodSettings = []; - for (var j = 0; j < message.methodSettings.length; ++j) - object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - object.newIssueUri = message.newIssueUri; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - object.documentationUri = message.documentationUri; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - object.apiShortName = message.apiShortName; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - object.githubLabel = message.githubLabel; - if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { - object.codeownerGithubTeams = []; - for (var j = 0; j < message.codeownerGithubTeams.length; ++j) - object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - object.docTagPrefix = message.docTagPrefix; - if (message.organization != null && message.hasOwnProperty("organization")) - object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; - if (message.librarySettings && message.librarySettings.length) { - object.librarySettings = []; - for (var j = 0; j < message.librarySettings.length; ++j) - object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; - return object; - }; - - /** - * Converts this Publishing to JSON. - * @function toJSON - * @memberof google.api.Publishing - * @instance - * @returns {Object.} JSON object - */ - Publishing.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Publishing - * @function getTypeUrl - * @memberof google.api.Publishing - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Publishing"; - }; - - return Publishing; - })(); - - api.JavaSettings = (function() { - - /** - * Properties of a JavaSettings. - * @memberof google.api - * @interface IJavaSettings - * @property {string|null} [libraryPackage] JavaSettings libraryPackage - * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames - * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common - */ - - /** - * Constructs a new JavaSettings. - * @memberof google.api - * @classdesc Represents a JavaSettings. - * @implements IJavaSettings - * @constructor - * @param {google.api.IJavaSettings=} [properties] Properties to set - */ - function JavaSettings(properties) { - this.serviceClassNames = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * JavaSettings libraryPackage. - * @member {string} libraryPackage - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.libraryPackage = ""; - - /** - * JavaSettings serviceClassNames. - * @member {Object.} serviceClassNames - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.serviceClassNames = $util.emptyObject; - - /** - * JavaSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.common = null; - - /** - * Creates a new JavaSettings instance using the specified properties. - * @function create - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings=} [properties] Properties to set - * @returns {google.api.JavaSettings} JavaSettings instance - */ - JavaSettings.create = function create(properties) { - return new JavaSettings(properties); - }; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encode - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); - if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) - for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.libraryPackage = reader.string(); - break; - } - case 2: { - if (message.serviceClassNames === $util.emptyObject) - message.serviceClassNames = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.serviceClassNames[key] = value; - break; - } - case 3: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JavaSettings message. - * @function verify - * @memberof google.api.JavaSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JavaSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - if (!$util.isString(message.libraryPackage)) - return "libraryPackage: string expected"; - if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { - if (!$util.isObject(message.serviceClassNames)) - return "serviceClassNames: object expected"; - var key = Object.keys(message.serviceClassNames); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.serviceClassNames[key[i]])) - return "serviceClassNames: string{k:string} expected"; - } - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.JavaSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.JavaSettings} JavaSettings - */ - JavaSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.JavaSettings) - return object; - var message = new $root.google.api.JavaSettings(); - if (object.libraryPackage != null) - message.libraryPackage = String(object.libraryPackage); - if (object.serviceClassNames) { - if (typeof object.serviceClassNames !== "object") - throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); - message.serviceClassNames = {}; - for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) - message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); - } - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.JavaSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.JavaSettings - * @static - * @param {google.api.JavaSettings} message JavaSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JavaSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.serviceClassNames = {}; - if (options.defaults) { - object.libraryPackage = ""; - object.common = null; - } - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - object.libraryPackage = message.libraryPackage; - var keys2; - if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { - object.serviceClassNames = {}; - for (var j = 0; j < keys2.length; ++j) - object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; - } - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this JavaSettings to JSON. - * @function toJSON - * @memberof google.api.JavaSettings - * @instance - * @returns {Object.} JSON object - */ - JavaSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for JavaSettings - * @function getTypeUrl - * @memberof google.api.JavaSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.JavaSettings"; - }; - - return JavaSettings; - })(); - - api.CppSettings = (function() { - - /** - * Properties of a CppSettings. - * @memberof google.api - * @interface ICppSettings - * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common - */ - - /** - * Constructs a new CppSettings. - * @memberof google.api - * @classdesc Represents a CppSettings. - * @implements ICppSettings - * @constructor - * @param {google.api.ICppSettings=} [properties] Properties to set - */ - function CppSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CppSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.CppSettings - * @instance - */ - CppSettings.prototype.common = null; - - /** - * Creates a new CppSettings instance using the specified properties. - * @function create - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings=} [properties] Properties to set - * @returns {google.api.CppSettings} CppSettings instance - */ - CppSettings.create = function create(properties) { - return new CppSettings(properties); - }; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CppSettings message. - * @function verify - * @memberof google.api.CppSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CppSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CppSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CppSettings} CppSettings - */ - CppSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CppSettings) - return object; - var message = new $root.google.api.CppSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.CppSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CppSettings - * @static - * @param {google.api.CppSettings} message CppSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CppSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this CppSettings to JSON. - * @function toJSON - * @memberof google.api.CppSettings - * @instance - * @returns {Object.} JSON object - */ - CppSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CppSettings - * @function getTypeUrl - * @memberof google.api.CppSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CppSettings"; - }; - - return CppSettings; - })(); - - api.PhpSettings = (function() { - - /** - * Properties of a PhpSettings. - * @memberof google.api - * @interface IPhpSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common - */ - - /** - * Constructs a new PhpSettings. - * @memberof google.api - * @classdesc Represents a PhpSettings. - * @implements IPhpSettings - * @constructor - * @param {google.api.IPhpSettings=} [properties] Properties to set - */ - function PhpSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PhpSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PhpSettings - * @instance - */ - PhpSettings.prototype.common = null; - - /** - * Creates a new PhpSettings instance using the specified properties. - * @function create - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings=} [properties] Properties to set - * @returns {google.api.PhpSettings} PhpSettings instance - */ - PhpSettings.create = function create(properties) { - return new PhpSettings(properties); - }; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PhpSettings message. - * @function verify - * @memberof google.api.PhpSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PhpSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PhpSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PhpSettings} PhpSettings - */ - PhpSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PhpSettings) - return object; - var message = new $root.google.api.PhpSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PhpSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PhpSettings - * @static - * @param {google.api.PhpSettings} message PhpSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PhpSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this PhpSettings to JSON. - * @function toJSON - * @memberof google.api.PhpSettings - * @instance - * @returns {Object.} JSON object - */ - PhpSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PhpSettings - * @function getTypeUrl - * @memberof google.api.PhpSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PhpSettings"; - }; - - return PhpSettings; - })(); - - api.PythonSettings = (function() { - - /** - * Properties of a PythonSettings. - * @memberof google.api - * @interface IPythonSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common - */ - - /** - * Constructs a new PythonSettings. - * @memberof google.api - * @classdesc Represents a PythonSettings. - * @implements IPythonSettings - * @constructor - * @param {google.api.IPythonSettings=} [properties] Properties to set - */ - function PythonSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PythonSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PythonSettings - * @instance - */ - PythonSettings.prototype.common = null; - - /** - * Creates a new PythonSettings instance using the specified properties. - * @function create - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings=} [properties] Properties to set - * @returns {google.api.PythonSettings} PythonSettings instance - */ - PythonSettings.create = function create(properties) { - return new PythonSettings(properties); - }; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PythonSettings message. - * @function verify - * @memberof google.api.PythonSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PythonSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PythonSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PythonSettings} PythonSettings - */ - PythonSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PythonSettings) - return object; - var message = new $root.google.api.PythonSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PythonSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PythonSettings - * @static - * @param {google.api.PythonSettings} message PythonSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PythonSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this PythonSettings to JSON. - * @function toJSON - * @memberof google.api.PythonSettings - * @instance - * @returns {Object.} JSON object - */ - PythonSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PythonSettings - * @function getTypeUrl - * @memberof google.api.PythonSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PythonSettings"; - }; - - return PythonSettings; - })(); - - api.NodeSettings = (function() { - - /** - * Properties of a NodeSettings. - * @memberof google.api - * @interface INodeSettings - * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common - */ - - /** - * Constructs a new NodeSettings. - * @memberof google.api - * @classdesc Represents a NodeSettings. - * @implements INodeSettings - * @constructor - * @param {google.api.INodeSettings=} [properties] Properties to set - */ - function NodeSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.NodeSettings - * @instance - */ - NodeSettings.prototype.common = null; - - /** - * Creates a new NodeSettings instance using the specified properties. - * @function create - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings=} [properties] Properties to set - * @returns {google.api.NodeSettings} NodeSettings instance - */ - NodeSettings.create = function create(properties) { - return new NodeSettings(properties); - }; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encode - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeSettings message. - * @function verify - * @memberof google.api.NodeSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.NodeSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.NodeSettings} NodeSettings - */ - NodeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.NodeSettings) - return object; - var message = new $root.google.api.NodeSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.NodeSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.NodeSettings - * @static - * @param {google.api.NodeSettings} message NodeSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this NodeSettings to JSON. - * @function toJSON - * @memberof google.api.NodeSettings - * @instance - * @returns {Object.} JSON object - */ - NodeSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeSettings - * @function getTypeUrl - * @memberof google.api.NodeSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.NodeSettings"; - }; - - return NodeSettings; - })(); - - api.DotnetSettings = (function() { - - /** - * Properties of a DotnetSettings. - * @memberof google.api - * @interface IDotnetSettings - * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common - * @property {Object.|null} [renamedServices] DotnetSettings renamedServices - * @property {Object.|null} [renamedResources] DotnetSettings renamedResources - * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources - * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases - * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures - */ - - /** - * Constructs a new DotnetSettings. - * @memberof google.api - * @classdesc Represents a DotnetSettings. - * @implements IDotnetSettings - * @constructor - * @param {google.api.IDotnetSettings=} [properties] Properties to set - */ - function DotnetSettings(properties) { - this.renamedServices = {}; - this.renamedResources = {}; - this.ignoredResources = []; - this.forcedNamespaceAliases = []; - this.handwrittenSignatures = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DotnetSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.common = null; - - /** - * DotnetSettings renamedServices. - * @member {Object.} renamedServices - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedServices = $util.emptyObject; - - /** - * DotnetSettings renamedResources. - * @member {Object.} renamedResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedResources = $util.emptyObject; - - /** - * DotnetSettings ignoredResources. - * @member {Array.} ignoredResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.ignoredResources = $util.emptyArray; - - /** - * DotnetSettings forcedNamespaceAliases. - * @member {Array.} forcedNamespaceAliases - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; - - /** - * DotnetSettings handwrittenSignatures. - * @member {Array.} handwrittenSignatures - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @function create - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings=} [properties] Properties to set - * @returns {google.api.DotnetSettings} DotnetSettings instance - */ - DotnetSettings.create = function create(properties) { - return new DotnetSettings(properties); - }; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encode - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) - for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); - if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) - for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); - if (message.ignoredResources != null && message.ignoredResources.length) - for (var i = 0; i < message.ignoredResources.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); - if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); - if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); - return writer; - }; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - case 2: { - if (message.renamedServices === $util.emptyObject) - message.renamedServices = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.renamedServices[key] = value; - break; - } - case 3: { - if (message.renamedResources === $util.emptyObject) - message.renamedResources = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.renamedResources[key] = value; - break; - } - case 4: { - if (!(message.ignoredResources && message.ignoredResources.length)) - message.ignoredResources = []; - message.ignoredResources.push(reader.string()); - break; - } - case 5: { - if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) - message.forcedNamespaceAliases = []; - message.forcedNamespaceAliases.push(reader.string()); - break; - } - case 6: { - if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) - message.handwrittenSignatures = []; - message.handwrittenSignatures.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DotnetSettings message. - * @function verify - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DotnetSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { - if (!$util.isObject(message.renamedServices)) - return "renamedServices: object expected"; - var key = Object.keys(message.renamedServices); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedServices[key[i]])) - return "renamedServices: string{k:string} expected"; - } - if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { - if (!$util.isObject(message.renamedResources)) - return "renamedResources: object expected"; - var key = Object.keys(message.renamedResources); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedResources[key[i]])) - return "renamedResources: string{k:string} expected"; - } - if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { - if (!Array.isArray(message.ignoredResources)) - return "ignoredResources: array expected"; - for (var i = 0; i < message.ignoredResources.length; ++i) - if (!$util.isString(message.ignoredResources[i])) - return "ignoredResources: string[] expected"; - } - if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { - if (!Array.isArray(message.forcedNamespaceAliases)) - return "forcedNamespaceAliases: array expected"; - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - if (!$util.isString(message.forcedNamespaceAliases[i])) - return "forcedNamespaceAliases: string[] expected"; - } - if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { - if (!Array.isArray(message.handwrittenSignatures)) - return "handwrittenSignatures: array expected"; - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - if (!$util.isString(message.handwrittenSignatures[i])) - return "handwrittenSignatures: string[] expected"; - } - return null; - }; - - /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.DotnetSettings} DotnetSettings - */ - DotnetSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.DotnetSettings) - return object; - var message = new $root.google.api.DotnetSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.DotnetSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - if (object.renamedServices) { - if (typeof object.renamedServices !== "object") - throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); - message.renamedServices = {}; - for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) - message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); - } - if (object.renamedResources) { - if (typeof object.renamedResources !== "object") - throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); - message.renamedResources = {}; - for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) - message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); - } - if (object.ignoredResources) { - if (!Array.isArray(object.ignoredResources)) - throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); - message.ignoredResources = []; - for (var i = 0; i < object.ignoredResources.length; ++i) - message.ignoredResources[i] = String(object.ignoredResources[i]); - } - if (object.forcedNamespaceAliases) { - if (!Array.isArray(object.forcedNamespaceAliases)) - throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); - message.forcedNamespaceAliases = []; - for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) - message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); - } - if (object.handwrittenSignatures) { - if (!Array.isArray(object.handwrittenSignatures)) - throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); - message.handwrittenSignatures = []; - for (var i = 0; i < object.handwrittenSignatures.length; ++i) - message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); - } - return message; - }; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.DotnetSettings} message DotnetSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DotnetSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.ignoredResources = []; - object.forcedNamespaceAliases = []; - object.handwrittenSignatures = []; - } - if (options.objects || options.defaults) { - object.renamedServices = {}; - object.renamedResources = {}; - } - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - var keys2; - if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { - object.renamedServices = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; - } - if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { - object.renamedResources = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; - } - if (message.ignoredResources && message.ignoredResources.length) { - object.ignoredResources = []; - for (var j = 0; j < message.ignoredResources.length; ++j) - object.ignoredResources[j] = message.ignoredResources[j]; - } - if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { - object.forcedNamespaceAliases = []; - for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) - object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; - } - if (message.handwrittenSignatures && message.handwrittenSignatures.length) { - object.handwrittenSignatures = []; - for (var j = 0; j < message.handwrittenSignatures.length; ++j) - object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; - } - return object; - }; - - /** - * Converts this DotnetSettings to JSON. - * @function toJSON - * @memberof google.api.DotnetSettings - * @instance - * @returns {Object.} JSON object - */ - DotnetSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DotnetSettings - * @function getTypeUrl - * @memberof google.api.DotnetSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.DotnetSettings"; - }; - - return DotnetSettings; - })(); - - api.RubySettings = (function() { - - /** - * Properties of a RubySettings. - * @memberof google.api - * @interface IRubySettings - * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common - */ - - /** - * Constructs a new RubySettings. - * @memberof google.api - * @classdesc Represents a RubySettings. - * @implements IRubySettings - * @constructor - * @param {google.api.IRubySettings=} [properties] Properties to set - */ - function RubySettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RubySettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.RubySettings - * @instance - */ - RubySettings.prototype.common = null; - - /** - * Creates a new RubySettings instance using the specified properties. - * @function create - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings=} [properties] Properties to set - * @returns {google.api.RubySettings} RubySettings instance - */ - RubySettings.create = function create(properties) { - return new RubySettings(properties); - }; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encode - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RubySettings message. - * @function verify - * @memberof google.api.RubySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RubySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.RubySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.RubySettings} RubySettings - */ - RubySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.RubySettings) - return object; - var message = new $root.google.api.RubySettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.RubySettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.RubySettings - * @static - * @param {google.api.RubySettings} message RubySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RubySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this RubySettings to JSON. - * @function toJSON - * @memberof google.api.RubySettings - * @instance - * @returns {Object.} JSON object - */ - RubySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RubySettings - * @function getTypeUrl - * @memberof google.api.RubySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.RubySettings"; - }; - - return RubySettings; - })(); - - api.GoSettings = (function() { - - /** - * Properties of a GoSettings. - * @memberof google.api - * @interface IGoSettings - * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common - */ - - /** - * Constructs a new GoSettings. - * @memberof google.api - * @classdesc Represents a GoSettings. - * @implements IGoSettings - * @constructor - * @param {google.api.IGoSettings=} [properties] Properties to set - */ - function GoSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GoSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.GoSettings - * @instance - */ - GoSettings.prototype.common = null; - - /** - * Creates a new GoSettings instance using the specified properties. - * @function create - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings=} [properties] Properties to set - * @returns {google.api.GoSettings} GoSettings instance - */ - GoSettings.create = function create(properties) { - return new GoSettings(properties); - }; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encode - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GoSettings message. - * @function verify - * @memberof google.api.GoSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GoSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.GoSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.GoSettings} GoSettings - */ - GoSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.GoSettings) - return object; - var message = new $root.google.api.GoSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.GoSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.GoSettings - * @static - * @param {google.api.GoSettings} message GoSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GoSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this GoSettings to JSON. - * @function toJSON - * @memberof google.api.GoSettings - * @instance - * @returns {Object.} JSON object - */ - GoSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GoSettings - * @function getTypeUrl - * @memberof google.api.GoSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.GoSettings"; - }; - - return GoSettings; - })(); - - api.MethodSettings = (function() { - - /** - * Properties of a MethodSettings. - * @memberof google.api - * @interface IMethodSettings - * @property {string|null} [selector] MethodSettings selector - * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning - * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields - */ - - /** - * Constructs a new MethodSettings. - * @memberof google.api - * @classdesc Represents a MethodSettings. - * @implements IMethodSettings - * @constructor - * @param {google.api.IMethodSettings=} [properties] Properties to set - */ - function MethodSettings(properties) { - this.autoPopulatedFields = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodSettings selector. - * @member {string} selector - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.selector = ""; - - /** - * MethodSettings longRunning. - * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.longRunning = null; - - /** - * MethodSettings autoPopulatedFields. - * @member {Array.} autoPopulatedFields - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings=} [properties] Properties to set - * @returns {google.api.MethodSettings} MethodSettings instance - */ - MethodSettings.create = function create(properties) { - return new MethodSettings(properties); - }; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) - $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); - return writer; - }; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); - break; - } - case 3: { - if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) - message.autoPopulatedFields = []; - message.autoPopulatedFields.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodSettings message. - * @function verify - * @memberof google.api.MethodSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) { - var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); - if (error) - return "longRunning." + error; - } - if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { - if (!Array.isArray(message.autoPopulatedFields)) - return "autoPopulatedFields: array expected"; - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - if (!$util.isString(message.autoPopulatedFields[i])) - return "autoPopulatedFields: string[] expected"; - } - return null; - }; - - /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings} MethodSettings - */ - MethodSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings) - return object; - var message = new $root.google.api.MethodSettings(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.longRunning != null) { - if (typeof object.longRunning !== "object") - throw TypeError(".google.api.MethodSettings.longRunning: object expected"); - message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); - } - if (object.autoPopulatedFields) { - if (!Array.isArray(object.autoPopulatedFields)) - throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); - message.autoPopulatedFields = []; - for (var i = 0; i < object.autoPopulatedFields.length; ++i) - message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); - } - return message; - }; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings - * @static - * @param {google.api.MethodSettings} message MethodSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.autoPopulatedFields = []; - if (options.defaults) { - object.selector = ""; - object.longRunning = null; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) - object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); - if (message.autoPopulatedFields && message.autoPopulatedFields.length) { - object.autoPopulatedFields = []; - for (var j = 0; j < message.autoPopulatedFields.length; ++j) - object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; - } - return object; - }; - - /** - * Converts this MethodSettings to JSON. - * @function toJSON - * @memberof google.api.MethodSettings - * @instance - * @returns {Object.} JSON object - */ - MethodSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodSettings - * @function getTypeUrl - * @memberof google.api.MethodSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings"; - }; - - MethodSettings.LongRunning = (function() { - - /** - * Properties of a LongRunning. - * @memberof google.api.MethodSettings - * @interface ILongRunning - * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay - * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier - * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay - * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout - */ - - /** - * Constructs a new LongRunning. - * @memberof google.api.MethodSettings - * @classdesc Represents a LongRunning. - * @implements ILongRunning - * @constructor - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - */ - function LongRunning(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LongRunning initialPollDelay. - * @member {google.protobuf.IDuration|null|undefined} initialPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.initialPollDelay = null; - - /** - * LongRunning pollDelayMultiplier. - * @member {number} pollDelayMultiplier - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.pollDelayMultiplier = 0; - - /** - * LongRunning maxPollDelay. - * @member {google.protobuf.IDuration|null|undefined} maxPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.maxPollDelay = null; - - /** - * LongRunning totalPollTimeout. - * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.totalPollTimeout = null; - - /** - * Creates a new LongRunning instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - * @returns {google.api.MethodSettings.LongRunning} LongRunning instance - */ - LongRunning.create = function create(properties) { - return new LongRunning(properties); - }; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) - $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); - if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) - $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) - $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 2: { - message.pollDelayMultiplier = reader.float(); - break; - } - case 3: { - message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 4: { - message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LongRunning message. - * @function verify - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LongRunning.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); - if (error) - return "initialPollDelay." + error; - } - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - if (typeof message.pollDelayMultiplier !== "number") - return "pollDelayMultiplier: number expected"; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); - if (error) - return "maxPollDelay." + error; - } - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { - var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); - if (error) - return "totalPollTimeout." + error; - } - return null; - }; - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings.LongRunning} LongRunning - */ - LongRunning.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings.LongRunning) - return object; - var message = new $root.google.api.MethodSettings.LongRunning(); - if (object.initialPollDelay != null) { - if (typeof object.initialPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); - message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); - } - if (object.pollDelayMultiplier != null) - message.pollDelayMultiplier = Number(object.pollDelayMultiplier); - if (object.maxPollDelay != null) { - if (typeof object.maxPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); - message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); - } - if (object.totalPollTimeout != null) { - if (typeof object.totalPollTimeout !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); - message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); - } - return message; - }; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.LongRunning} message LongRunning - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LongRunning.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.initialPollDelay = null; - object.pollDelayMultiplier = 0; - object.maxPollDelay = null; - object.totalPollTimeout = null; - } - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) - object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) - object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) - object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); - return object; - }; - - /** - * Converts this LongRunning to JSON. - * @function toJSON - * @memberof google.api.MethodSettings.LongRunning - * @instance - * @returns {Object.} JSON object - */ - LongRunning.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LongRunning - * @function getTypeUrl - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; - }; - - return LongRunning; - })(); - - return MethodSettings; - })(); - - /** - * ClientLibraryOrganization enum. - * @name google.api.ClientLibraryOrganization - * @enum {number} - * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value - * @property {number} CLOUD=1 CLOUD value - * @property {number} ADS=2 ADS value - * @property {number} PHOTOS=3 PHOTOS value - * @property {number} STREET_VIEW=4 STREET_VIEW value - * @property {number} SHOPPING=5 SHOPPING value - * @property {number} GEO=6 GEO value - * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value - */ - api.ClientLibraryOrganization = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD"] = 1; - values[valuesById[2] = "ADS"] = 2; - values[valuesById[3] = "PHOTOS"] = 3; - values[valuesById[4] = "STREET_VIEW"] = 4; - values[valuesById[5] = "SHOPPING"] = 5; - values[valuesById[6] = "GEO"] = 6; - values[valuesById[7] = "GENERATIVE_AI"] = 7; - return values; - })(); - - /** - * ClientLibraryDestination enum. - * @name google.api.ClientLibraryDestination - * @enum {number} - * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value - * @property {number} GITHUB=10 GITHUB value - * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value - */ - api.ClientLibraryDestination = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; - values[valuesById[10] = "GITHUB"] = 10; - values[valuesById[20] = "PACKAGE_MANAGER"] = 20; - return values; - })(); - - /** - * LaunchStage enum. - * @name google.api.LaunchStage - * @enum {number} - * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value - * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value - * @property {number} PRELAUNCH=7 PRELAUNCH value - * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value - * @property {number} ALPHA=2 ALPHA value - * @property {number} BETA=3 BETA value - * @property {number} GA=4 GA value - * @property {number} DEPRECATED=5 DEPRECATED value - */ - api.LaunchStage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; - values[valuesById[6] = "UNIMPLEMENTED"] = 6; - values[valuesById[7] = "PRELAUNCH"] = 7; - values[valuesById[1] = "EARLY_ACCESS"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "BETA"] = 3; - values[valuesById[4] = "GA"] = 4; - values[valuesById[5] = "DEPRECATED"] = 5; - return values; - })(); - - api.ResourceDescriptor = (function() { - - /** - * Properties of a ResourceDescriptor. - * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style - */ - - /** - * Constructs a new ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor - * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; - - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; - - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; - - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; - - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; - - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.singular = ""; - - /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.style = $util.emptyArray; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @function create - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance - */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); - }; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - } - case 3: { - message.nameField = reader.string(); - break; - } - case 4: { - message.history = reader.int32(); - break; - } - case 5: { - message.plural = reader.string(); - break; - } - case 6: { - message.singular = reader.string(); - break; - } - case 10: { - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceDescriptor message. - * @function verify - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } - } - return null; - }; - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) - return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - default: - if (typeof object.history === "number") { - message.history = object.history; - break; - } - break; - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; - } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - if (typeof object.style[i] === "number") { - message.style[i] = object.style[i]; - break; - } - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; - } - return object; - }; - - /** - * Converts this ResourceDescriptor to JSON. - * @function toJSON - * @memberof google.api.ResourceDescriptor - * @instance - * @returns {Object.} JSON object - */ - ResourceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceDescriptor - * @function getTypeUrl - * @memberof google.api.ResourceDescriptor - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceDescriptor"; - }; - - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); - - return ResourceDescriptor; - })(); - - api.ResourceReference = (function() { - - /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType - */ - - /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference - * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set - */ - function ResourceReference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.type = ""; - - /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.childType = ""; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @function create - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance - */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); - }; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); - return writer; - }; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - message.childType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceReference message. - * @function verify - * @memberof google.api.ResourceReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; - return null; - }; - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceReference - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference - */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) - return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); - return message; - }; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceReference - * @static - * @param {google.api.ResourceReference} message ResourceReference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceReference.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = ""; - object.childType = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; - return object; - }; - - /** - * Converts this ResourceReference to JSON. - * @function toJSON - * @memberof google.api.ResourceReference - * @instance - * @returns {Object.} JSON object - */ - ResourceReference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceReference - * @function getTypeUrl - * @memberof google.api.ResourceReference - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceReference"; - }; - - return ResourceReference; - })(); - - return api; - })(); - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.FileDescriptorSet = (function() { - - /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file - */ - - /** - * Constructs a new FileDescriptorSet. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet - * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - */ - function FileDescriptorSet(properties) { - this.file = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance - */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); - }; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorSet message. - * @function verify - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) - return "file: array expected"; - for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); - if (error) - return "file." + error; - } - } - return null; - }; - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) - return object; - var message = new $root.google.protobuf.FileDescriptorSet(); - if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; - for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); - } - return object; - }; - - /** - * Converts this FileDescriptorSet to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorSet - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorSet - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; - }; - - return FileDescriptorSet; - })(); - - /** - * Edition enum. - * @name google.protobuf.Edition - * @enum {number} - * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value - * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value - * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value - * @property {number} EDITION_2023=1000 EDITION_2023 value - * @property {number} EDITION_2024=1001 EDITION_2024 value - * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value - * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value - * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value - * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value - * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value - * @property {number} EDITION_MAX=2147483647 EDITION_MAX value - */ - protobuf.Edition = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EDITION_UNKNOWN"] = 0; - values[valuesById[998] = "EDITION_PROTO2"] = 998; - values[valuesById[999] = "EDITION_PROTO3"] = 999; - values[valuesById[1000] = "EDITION_2023"] = 1000; - values[valuesById[1001] = "EDITION_2024"] = 1001; - values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; - values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; - values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; - values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; - values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; - values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; - return values; - })(); - - protobuf.FileDescriptorProto = (function() { - - /** - * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto - * @property {string|null} [name] FileDescriptorProto name - * @property {string|null} ["package"] FileDescriptorProto package - * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency - * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency - * @property {Array.|null} [messageType] FileDescriptorProto messageType - * @property {Array.|null} [enumType] FileDescriptorProto enumType - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo - * @property {string|null} [syntax] FileDescriptorProto syntax - * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition - */ - - /** - * Constructs a new FileDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto - * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; - - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; - - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; - - /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - - /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - - /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; - - /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.service = $util.emptyArray; - - /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.extension = $util.emptyArray; - - /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.options = null; - - /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.sourceCodeInfo = null; - - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; - - /** - * FileDescriptorProto edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.edition = 0; - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance - */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); - }; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message["package"] = reader.string(); - break; - } - case 3: { - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - } - case 10: { - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - } - case 11: { - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - } - case 4: { - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 8: { - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.syntax = reader.string(); - break; - } - case 14: { - message.edition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorProto message. - * @function verify - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) - return "dependency: array expected"; - for (var i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); - if (error) - return "service." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); - if (error) - return "sourceCodeInfo." + error; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) - return object; - var message = new $root.google.protobuf.FileDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; - for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); - } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); - } - if (object.syntax != null) - message.syntax = String(object.syntax); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FileDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; - }; - - return FileDescriptorProto; - })(); - - protobuf.DescriptorProto = (function() { - - /** - * Properties of a DescriptorProto. - * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName - */ - - /** - * Constructs a new DescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto - * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; - - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.field = $util.emptyArray; - - /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension = $util.emptyArray; - - /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nestedType = $util.emptyArray; - - /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; - - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance - */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); - }; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - } - case 10: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DescriptorProto message. - * @function verify - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) - return "field: array expected"; - for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); - if (error) - return "field." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { - if (!Array.isArray(message.nestedType)) - return "nestedType: array expected"; - for (var i = 0; i < message.nestedType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); - if (error) - return "nestedType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { - if (!Array.isArray(message.extensionRange)) - return "extensionRange: array expected"; - for (var i = 0; i < message.extensionRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); - if (error) - return "extensionRange." + error; - } - } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { - if (!Array.isArray(message.oneofDecl)) - return "oneofDecl: array expected"; - for (var i = 0; i < message.oneofDecl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); - if (error) - return "oneofDecl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto - */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) - return object; - var message = new $root.google.protobuf.DescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; - for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); - } - } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; - object.enumType = []; - object.extensionRange = []; - object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this DescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto - * @instance - * @returns {Object.} JSON object - */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto"; - }; - - DescriptorProto.ExtensionRange = (function() { - - /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options - */ - - /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange - * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - */ - function ExtensionRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; - - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; - - /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.options = null; - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance - */ - ExtensionRange.create = function create(properties) { - return new ExtensionRange(properties); - }; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); - message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - object.options = null; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ExtensionRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - * @returns {Object.} JSON object - */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; - }; - - return ExtensionRange; - })(); - - DescriptorProto.ReservedRange = (function() { - - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ - - /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange - * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - */ - function ReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; - - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance - */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); - }; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReservedRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReservedRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; - }; - - return ReservedRange; - })(); - - return DescriptorProto; - })(); - - protobuf.ExtensionRangeOptions = (function() { - - /** - * Properties of an ExtensionRangeOptions. - * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption - * @property {Array.|null} [declaration] ExtensionRangeOptions declaration - * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features - * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification - */ - - /** - * Constructs a new ExtensionRangeOptions. - * @memberof google.protobuf - * @classdesc Represents an ExtensionRangeOptions. - * @implements IExtensionRangeOptions - * @constructor - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - */ - function ExtensionRangeOptions(properties) { - this.uninterpretedOption = []; - this.declaration = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRangeOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ExtensionRangeOptions declaration. - * @member {Array.} declaration - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.declaration = $util.emptyArray; - - /** - * ExtensionRangeOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.features = null; - - /** - * ExtensionRangeOptions verification. - * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.verification = 1; - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance - */ - ExtensionRangeOptions.create = function create(properties) { - return new ExtensionRangeOptions(properties); - }; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.declaration != null && message.declaration.length) - for (var i = 0; i < message.declaration.length; ++i) - $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.declaration && message.declaration.length)) - message.declaration = []; - message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.verification = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRangeOptions message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRangeOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message.declaration != null && message.hasOwnProperty("declaration")) { - if (!Array.isArray(message.declaration)) - return "declaration: array expected"; - for (var i = 0; i < message.declaration.length; ++i) { - var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); - if (error) - return "declaration." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.verification != null && message.hasOwnProperty("verification")) - switch (message.verification) { - default: - return "verification: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - */ - ExtensionRangeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object.declaration) { - if (!Array.isArray(object.declaration)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); - message.declaration = []; - for (var i = 0; i < object.declaration.length; ++i) { - if (typeof object.declaration[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); - message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - switch (object.verification) { - case "DECLARATION": - case 0: - message.verification = 0; - break; - default: - if (typeof object.verification === "number") { - message.verification = object.verification; - break; - } - break; - case "UNVERIFIED": - case 1: - message.verification = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRangeOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.declaration = []; - object.uninterpretedOption = []; - } - if (options.defaults) { - object.verification = options.enums === String ? "UNVERIFIED" : 1; - object.features = null; - } - if (message.declaration && message.declaration.length) { - object.declaration = []; - for (var j = 0; j < message.declaration.length; ++j) - object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); - } - if (message.verification != null && message.hasOwnProperty("verification")) - object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - * @returns {Object.} JSON object - */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; - }; - - ExtensionRangeOptions.Declaration = (function() { - - /** - * Properties of a Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @interface IDeclaration - * @property {number|null} [number] Declaration number - * @property {string|null} [fullName] Declaration fullName - * @property {string|null} [type] Declaration type - * @property {boolean|null} [reserved] Declaration reserved - * @property {boolean|null} [repeated] Declaration repeated - */ - - /** - * Constructs a new Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @classdesc Represents a Declaration. - * @implements IDeclaration - * @constructor - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - */ - function Declaration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Declaration number. - * @member {number} number - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.number = 0; - - /** - * Declaration fullName. - * @member {string} fullName - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.fullName = ""; - - /** - * Declaration type. - * @member {string} type - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.type = ""; - - /** - * Declaration reserved. - * @member {boolean} reserved - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.reserved = false; - - /** - * Declaration repeated. - * @member {boolean} repeated - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.repeated = false; - - /** - * Creates a new Declaration instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance - */ - Declaration.create = function create(properties) { - return new Declaration(properties); - }; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); - if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); - if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); - return writer; - }; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.number = reader.int32(); - break; - } - case 2: { - message.fullName = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - case 5: { - message.reserved = reader.bool(); - break; - } - case 6: { - message.repeated = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Declaration message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Declaration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) - if (!$util.isString(message.fullName)) - return "fullName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.reserved != null && message.hasOwnProperty("reserved")) - if (typeof message.reserved !== "boolean") - return "reserved: boolean expected"; - if (message.repeated != null && message.hasOwnProperty("repeated")) - if (typeof message.repeated !== "boolean") - return "repeated: boolean expected"; - return null; - }; - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - */ - Declaration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - if (object.number != null) - message.number = object.number | 0; - if (object.fullName != null) - message.fullName = String(object.fullName); - if (object.type != null) - message.type = String(object.type); - if (object.reserved != null) - message.reserved = Boolean(object.reserved); - if (object.repeated != null) - message.repeated = Boolean(object.repeated); - return message; - }; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Declaration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.number = 0; - object.fullName = ""; - object.type = ""; - object.reserved = false; - object.repeated = false; - } - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.fullName != null && message.hasOwnProperty("fullName")) - object.fullName = message.fullName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.reserved != null && message.hasOwnProperty("reserved")) - object.reserved = message.reserved; - if (message.repeated != null && message.hasOwnProperty("repeated")) - object.repeated = message.repeated; - return object; - }; - - /** - * Converts this Declaration to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - * @returns {Object.} JSON object - */ - Declaration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Declaration - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; - }; - - return Declaration; - })(); - - /** - * VerificationState enum. - * @name google.protobuf.ExtensionRangeOptions.VerificationState - * @enum {number} - * @property {number} DECLARATION=0 DECLARATION value - * @property {number} UNVERIFIED=1 UNVERIFIED value - */ - ExtensionRangeOptions.VerificationState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DECLARATION"] = 0; - values[valuesById[1] = "UNVERIFIED"] = 1; - return values; - })(); - - return ExtensionRangeOptions; - })(); - - protobuf.FieldDescriptorProto = (function() { - - /** - * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options - * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional - */ - - /** - * Constructs a new FieldDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto - * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - */ - function FieldDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; - - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; - - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; - - /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type = 1; - - /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.typeName = ""; - - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; - - /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; - - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; - - /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.jsonName = ""; - - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.proto3Optional = false; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance - */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); - }; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); - return writer; - }; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.number = reader.int32(); - break; - } - case 4: { - message.label = reader.int32(); - break; - } - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.typeName = reader.string(); - break; - } - case 2: { - message.extendee = reader.string(); - break; - } - case 7: { - message.defaultValue = reader.string(); - break; - } - case 9: { - message.oneofIndex = reader.int32(); - break; - } - case 10: { - message.jsonName = reader.string(); - break; - } - case 8: { - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - } - case 17: { - message.proto3Optional = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldDescriptorProto message. - * @function verify - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) - switch (message.label) { - default: - return "label: enum value expected"; - case 1: - case 3: - case 2: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } - if (message.typeName != null && message.hasOwnProperty("typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; - return null; - }; - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) - return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - default: - if (typeof object.label === "number") { - message.label = object.label; - break; - } - break; - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_DOUBLE": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; - break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; - break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; - break; - case "TYPE_SINT32": - case 17: - message.type = 17; - break; - case "TYPE_SINT64": - case 18: - message.type = 18; - break; - } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } - if (object.proto3Optional != null) - message.proto3Optional = Boolean(object.proto3Optional); - return message; - }; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - object.proto3Optional = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - object.proto3Optional = message.proto3Optional; - return object; - }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; - }; - - /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {number} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value - */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[3] = "TYPE_INT64"] = 3; - values[valuesById[4] = "TYPE_UINT64"] = 4; - values[valuesById[5] = "TYPE_INT32"] = 5; - values[valuesById[6] = "TYPE_FIXED64"] = 6; - values[valuesById[7] = "TYPE_FIXED32"] = 7; - values[valuesById[8] = "TYPE_BOOL"] = 8; - values[valuesById[9] = "TYPE_STRING"] = 9; - values[valuesById[10] = "TYPE_GROUP"] = 10; - values[valuesById[11] = "TYPE_MESSAGE"] = 11; - values[valuesById[12] = "TYPE_BYTES"] = 12; - values[valuesById[13] = "TYPE_UINT32"] = 13; - values[valuesById[14] = "TYPE_ENUM"] = 14; - values[valuesById[15] = "TYPE_SFIXED32"] = 15; - values[valuesById[16] = "TYPE_SFIXED64"] = 16; - values[valuesById[17] = "TYPE_SINT32"] = 17; - values[valuesById[18] = "TYPE_SINT64"] = 18; - return values; - })(); - - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[3] = "LABEL_REPEATED"] = 3; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; - return values; - })(); - - return FieldDescriptorProto; - })(); - - protobuf.OneofDescriptorProto = (function() { - - /** - * Properties of an OneofDescriptorProto. - * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options - */ - - /** - * Constructs a new OneofDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto - * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - */ - function OneofDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; - - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.options = null; - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance - */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); - }; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofDescriptorProto message. - * @function verify - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.OneofOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) - return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; - }; - - return OneofDescriptorProto; - })(); - - protobuf.EnumDescriptorProto = (function() { - - /** - * Properties of an EnumDescriptorProto. - * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange - * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName - */ - - /** - * Constructs a new EnumDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto - * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; - - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; - - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; - - /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance - */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) - return "value: array expected"; - for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); - if (error) - return "value." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; - for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; - }; - - EnumDescriptorProto.EnumReservedRange = (function() { - - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ - - /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange - * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - */ - function EnumReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; - - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance - */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); - }; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumReservedRange message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - */ - EnumReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this EnumReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - * @returns {Object.} JSON object - */ - EnumReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumReservedRange - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; - }; - - return EnumReservedRange; - })(); - - return EnumDescriptorProto; - })(); - - protobuf.EnumValueDescriptorProto = (function() { - - /** - * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options - */ - - /** - * Constructs a new EnumValueDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto - * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - */ - function EnumValueDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; - - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; - - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance - */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.number = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; - }; - - return EnumValueDescriptorProto; - })(); - - protobuf.ServiceDescriptorProto = (function() { - - /** - * Properties of a ServiceDescriptorProto. - * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options - */ - - /** - * Constructs a new ServiceDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto - * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - */ - function ServiceDescriptorProto(properties) { - this.method = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; - - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; - - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance - */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); - }; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceDescriptorProto message. - * @function verify - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) - return "method: array expected"; - for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); - if (error) - return "method." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) - return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; - }; - - return ServiceDescriptorProto; - })(); - - protobuf.MethodDescriptorProto = (function() { - - /** - * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming - */ - - /** - * Constructs a new MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto - * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - */ - function MethodDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; - - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; - - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; - - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance - */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); - }; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); - return writer; - }; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.inputType = reader.string(); - break; - } - case 3: { - message.outputType = reader.string(); - break; - } - case 4: { - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - } - case 5: { - message.clientStreaming = reader.bool(); - break; - } - case 6: { - message.serverStreaming = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodDescriptorProto message. - * @function verify - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.inputType != null && message.hasOwnProperty("inputType")) - if (!$util.isString(message.inputType)) - return "inputType: string expected"; - if (message.outputType != null && message.hasOwnProperty("outputType")) - if (!$util.isString(message.outputType)) - return "outputType: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - if (typeof message.clientStreaming !== "boolean") - return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - if (typeof message.serverStreaming !== "boolean") - return "serverStreaming: boolean expected"; - return null; - }; - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) - return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.inputType != null) - message.inputType = String(object.inputType); - if (object.outputType != null) - message.outputType = String(object.outputType); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); - } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); - return message; - }; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) - object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - object.serverStreaming = message.serverStreaming; - return object; - }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; - }; - - return MethodDescriptorProto; - })(); - - protobuf.FileOptions = (function() { - - /** - * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {string|null} [swiftPrefix] FileOptions swiftPrefix - * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix - * @property {string|null} [phpNamespace] FileOptions phpNamespace - * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace - * @property {string|null} [rubyPackage] FileOptions rubyPackage - * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition - */ - - /** - * Constructs a new FileOptions. - * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions - * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - */ - function FileOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.resourceDefinition"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; - - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; - - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; - - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; - - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; - - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; - - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; - - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; - - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; - - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; - - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; - - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = true; - - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; - - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; - - /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.swiftPrefix = ""; - - /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpClassPrefix = ""; - - /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpNamespace = ""; - - /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpMetadataNamespace = ""; - - /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.rubyPackage = ""; - - /** - * FileOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.features = null; - - /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; - - /** - * Creates a new FileOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance - */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); - }; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) - writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) - writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.javaPackage = reader.string(); - break; - } - case 8: { - message.javaOuterClassname = reader.string(); - break; - } - case 10: { - message.javaMultipleFiles = reader.bool(); - break; - } - case 20: { - message.javaGenerateEqualsAndHash = reader.bool(); - break; - } - case 27: { - message.javaStringCheckUtf8 = reader.bool(); - break; - } - case 9: { - message.optimizeFor = reader.int32(); - break; - } - case 11: { - message.goPackage = reader.string(); - break; - } - case 16: { - message.ccGenericServices = reader.bool(); - break; - } - case 17: { - message.javaGenericServices = reader.bool(); - break; - } - case 18: { - message.pyGenericServices = reader.bool(); - break; - } - case 23: { - message.deprecated = reader.bool(); - break; - } - case 31: { - message.ccEnableArenas = reader.bool(); - break; - } - case 36: { - message.objcClassPrefix = reader.string(); - break; - } - case 37: { - message.csharpNamespace = reader.string(); - break; - } - case 39: { - message.swiftPrefix = reader.string(); - break; - } - case 40: { - message.phpClassPrefix = reader.string(); - break; - } - case 41: { - message.phpNamespace = reader.string(); - break; - } - case 44: { - message.phpMetadataNamespace = reader.string(); - break; - } - case 45: { - message.rubyPackage = reader.string(); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileOptions message. - * @function verify - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - if (!$util.isString(message.javaPackage)) - return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - if (!$util.isString(message.javaOuterClassname)) - return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - if (typeof message.javaMultipleFiles !== "boolean") - return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - if (typeof message.javaGenerateEqualsAndHash !== "boolean") - return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - if (typeof message.javaStringCheckUtf8 !== "boolean") - return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - switch (message.optimizeFor) { - default: - return "optimizeFor: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - if (!$util.isString(message.goPackage)) - return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - if (typeof message.ccGenericServices !== "boolean") - return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - if (typeof message.javaGenericServices !== "boolean") - return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - if (typeof message.pyGenericServices !== "boolean") - return "pyGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - if (typeof message.ccEnableArenas !== "boolean") - return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - if (!$util.isString(message.objcClassPrefix)) - return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - if (!$util.isString(message.csharpNamespace)) - return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - if (!$util.isString(message.swiftPrefix)) - return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - if (!$util.isString(message.phpClassPrefix)) - return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - if (!$util.isString(message.phpNamespace)) - return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - if (!$util.isString(message.phpMetadataNamespace)) - return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - if (!$util.isString(message.rubyPackage)) - return "rubyPackage: string expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); - if (error) - return ".google.api.resourceDefinition." + error; - } - } - return null; - }; - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions - */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - default: - if (typeof object.optimizeFor === "number") { - message.optimizeFor = object.optimizeFor; - break; - } - break; - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; - } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.ccEnableArenas != null) - message.ccEnableArenas = Boolean(object.ccEnableArenas); - if (object.objcClassPrefix != null) - message.objcClassPrefix = String(object.objcClassPrefix); - if (object.csharpNamespace != null) - message.csharpNamespace = String(object.csharpNamespace); - if (object.swiftPrefix != null) - message.swiftPrefix = String(object.swiftPrefix); - if (object.phpClassPrefix != null) - message.phpClassPrefix = String(object.phpClassPrefix); - if (object.phpNamespace != null) - message.phpNamespace = String(object.phpNamespace); - if (object.phpMetadataNamespace != null) - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - if (object.rubyPackage != null) - message.rubyPackage = String(object.rubyPackage); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FileOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.FileOptions} message FileOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; - } - if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = true; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object.swiftPrefix = ""; - object.phpClassPrefix = ""; - object.phpNamespace = ""; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; - object.features = null; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); - } - return object; - }; - - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileOptions - * @function getTypeUrl - * @memberof google.protobuf.FileOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileOptions"; - }; - - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; - })(); - - return FileOptions; - })(); - - protobuf.MessageOptions = (function() { - - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource - */ - - /** - * Constructs a new MessageOptions. - * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions - * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - */ - function MessageOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; - - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; - - /** - * MessageOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * MessageOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.features = null; - - /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".google.api.resource"] = null; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance - */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); - }; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.messageSetWireFormat = reader.bool(); - break; - } - case 2: { - message.noStandardDescriptorAccessor = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 7: { - message.mapEntry = reader.bool(); - break; - } - case 11: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 12: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageOptions message. - * @function verify - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - if (typeof message.messageSetWireFormat !== "boolean") - return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - if (typeof message.noStandardDescriptorAccessor !== "boolean") - return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - if (typeof message.mapEntry !== "boolean") - return "mapEntry: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); - if (error) - return ".google.api.resource." + error; - } - return null; - }; - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions - */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MessageOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } - return message; - }; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.MessageOptions} message MessageOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); - return object; - }; - - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MessageOptions - * @function getTypeUrl - * @memberof google.protobuf.MessageOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MessageOptions"; - }; - - return MessageOptions; - })(); - - protobuf.FieldOptions = (function() { - - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {boolean|null} [debugRedact] FieldOptions debugRedact - * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention - * @property {Array.|null} [targets] FieldOptions targets - * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults - * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference - */ - - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { - this.targets = []; - this.editionDefaults = []; - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; - - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; - - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; - - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; - - /** - * FieldOptions unverifiedLazy. - * @member {boolean} unverifiedLazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.unverifiedLazy = false; - - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; - - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; - - /** - * FieldOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.debugRedact = false; - - /** - * FieldOptions retention. - * @member {google.protobuf.FieldOptions.OptionRetention} retention - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.retention = 0; - - /** - * FieldOptions targets. - * @member {Array.} targets - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.targets = $util.emptyArray; - - /** - * FieldOptions editionDefaults. - * @member {Array.} editionDefaults - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.editionDefaults = $util.emptyArray; - - /** - * FieldOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.features = null; - - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; - - /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.resourceReference"] = null; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance - */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); - }; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); - if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); - if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) - writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); - if (message.targets != null && message.targets.length) - for (var i = 0; i < message.targets.length; ++i) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); - if (message.editionDefaults != null && message.editionDefaults.length) - for (var i = 0; i < message.editionDefaults.length; ++i) - $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); - if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) - $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ctype = reader.int32(); - break; - } - case 2: { - message.packed = reader.bool(); - break; - } - case 6: { - message.jstype = reader.int32(); - break; - } - case 5: { - message.lazy = reader.bool(); - break; - } - case 15: { - message.unverifiedLazy = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 10: { - message.weak = reader.bool(); - break; - } - case 16: { - message.debugRedact = reader.bool(); - break; - } - case 17: { - message.retention = reader.int32(); - break; - } - case 19: { - if (!(message.targets && message.targets.length)) - message.targets = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.targets.push(reader.int32()); - } else - message.targets.push(reader.int32()); - break; - } - case 20: { - if (!(message.editionDefaults && message.editionDefaults.length)) - message.editionDefaults = []; - message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); - break; - } - case 21: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1052: { - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - } - case 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - if (typeof message.unverifiedLazy !== "boolean") - return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.retention != null && message.hasOwnProperty("retention")) - switch (message.retention) { - default: - return "retention: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.targets != null && message.hasOwnProperty("targets")) { - if (!Array.isArray(message.targets)) - return "targets: array expected"; - for (var i = 0; i < message.targets.length; ++i) - switch (message.targets[i]) { - default: - return "targets: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { - if (!Array.isArray(message.editionDefaults)) - return "editionDefaults: array expected"; - for (var i = 0; i < message.editionDefaults.length; ++i) { - var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); - if (error) - return "editionDefaults." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } - return null; - }; - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - default: - if (typeof object.ctype === "number") { - message.ctype = object.ctype; - break; - } - break; - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - default: - if (typeof object.jstype === "number") { - message.jstype = object.jstype; - break; - } - break; - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.unverifiedLazy != null) - message.unverifiedLazy = Boolean(object.unverifiedLazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - switch (object.retention) { - default: - if (typeof object.retention === "number") { - message.retention = object.retention; - break; - } - break; - case "RETENTION_UNKNOWN": - case 0: - message.retention = 0; - break; - case "RETENTION_RUNTIME": - case 1: - message.retention = 1; - break; - case "RETENTION_SOURCE": - case 2: - message.retention = 2; - break; - } - if (object.targets) { - if (!Array.isArray(object.targets)) - throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); - message.targets = []; - for (var i = 0; i < object.targets.length; ++i) - switch (object.targets[i]) { - default: - if (typeof object.targets[i] === "number") { - message.targets[i] = object.targets[i]; - break; - } - case "TARGET_TYPE_UNKNOWN": - case 0: - message.targets[i] = 0; - break; - case "TARGET_TYPE_FILE": - case 1: - message.targets[i] = 1; - break; - case "TARGET_TYPE_EXTENSION_RANGE": - case 2: - message.targets[i] = 2; - break; - case "TARGET_TYPE_MESSAGE": - case 3: - message.targets[i] = 3; - break; - case "TARGET_TYPE_FIELD": - case 4: - message.targets[i] = 4; - break; - case "TARGET_TYPE_ONEOF": - case 5: - message.targets[i] = 5; - break; - case "TARGET_TYPE_ENUM": - case 6: - message.targets[i] = 6; - break; - case "TARGET_TYPE_ENUM_ENTRY": - case 7: - message.targets[i] = 7; - break; - case "TARGET_TYPE_SERVICE": - case 8: - message.targets[i] = 8; - break; - case "TARGET_TYPE_METHOD": - case 9: - message.targets[i] = 9; - break; - } - } - if (object.editionDefaults) { - if (!Array.isArray(object.editionDefaults)) - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); - message.editionDefaults = []; - for (var i = 0; i < object.editionDefaults.length; ++i) { - if (typeof object.editionDefaults[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); - message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FieldOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - if (typeof object[".google.api.fieldBehavior"][i] === "number") { - message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; - break; - } - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - case "IDENTIFIER": - case 8: - message[".google.api.fieldBehavior"][i] = 8; - break; - } - } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } - return message; - }; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.FieldOptions} message FieldOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.targets = []; - object.editionDefaults = []; - object.uninterpretedOption = []; - object[".google.api.fieldBehavior"] = []; - } - if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; - object.packed = false; - object.deprecated = false; - object.lazy = false; - object.jstype = options.enums === String ? "JS_NORMAL" : 0; - object.weak = false; - object.unverifiedLazy = false; - object.debugRedact = false; - object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; - object.features = null; - object[".google.api.resourceReference"] = null; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - object.unverifiedLazy = message.unverifiedLazy; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.retention != null && message.hasOwnProperty("retention")) - object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; - if (message.targets && message.targets.length) { - object.targets = []; - for (var j = 0; j < message.targets.length; ++j) - object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; - } - if (message.editionDefaults && message.editionDefaults.length) { - object.editionDefaults = []; - for (var j = 0; j < message.editionDefaults.length; ++j) - object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { - object[".google.api.fieldBehavior"] = []; - for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); - return object; - }; - - /** - * Converts this FieldOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions - * @instance - * @returns {Object.} JSON object - */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldOptions - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions"; - }; - - /** - * CType enum. - * @name google.protobuf.FieldOptions.CType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} CORD=1 CORD value - * @property {number} STRING_PIECE=2 STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "CORD"] = 1; - values[valuesById[2] = "STRING_PIECE"] = 2; - return values; - })(); - - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {number} - * @property {number} JS_NORMAL=0 JS_NORMAL value - * @property {number} JS_STRING=1 JS_STRING value - * @property {number} JS_NUMBER=2 JS_NUMBER value - */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = 0; - values[valuesById[1] = "JS_STRING"] = 1; - values[valuesById[2] = "JS_NUMBER"] = 2; - return values; - })(); - - /** - * OptionRetention enum. - * @name google.protobuf.FieldOptions.OptionRetention - * @enum {number} - * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value - * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value - * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value - */ - FieldOptions.OptionRetention = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; - values[valuesById[1] = "RETENTION_RUNTIME"] = 1; - values[valuesById[2] = "RETENTION_SOURCE"] = 2; - return values; - })(); - - /** - * OptionTargetType enum. - * @name google.protobuf.FieldOptions.OptionTargetType - * @enum {number} - * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value - * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value - * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value - * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value - * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value - * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value - * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value - * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value - * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value - * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value - */ - FieldOptions.OptionTargetType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; - values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; - values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; - values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; - values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; - values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; - values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; - values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; - values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; - return values; - })(); - - FieldOptions.EditionDefault = (function() { - - /** - * Properties of an EditionDefault. - * @memberof google.protobuf.FieldOptions - * @interface IEditionDefault - * @property {google.protobuf.Edition|null} [edition] EditionDefault edition - * @property {string|null} [value] EditionDefault value - */ - - /** - * Constructs a new EditionDefault. - * @memberof google.protobuf.FieldOptions - * @classdesc Represents an EditionDefault. - * @implements IEditionDefault - * @constructor - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - */ - function EditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.edition = 0; - - /** - * EditionDefault value. - * @member {string} value - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.value = ""; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance - */ - EditionDefault.create = function create(properties) { - return new EditionDefault(properties); - }; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EditionDefault message. - * @function verify - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - */ - EditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) - return object; - var message = new $root.google.protobuf.FieldOptions.EditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.value = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this EditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - * @returns {Object.} JSON object - */ - EditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; - }; - - return EditionDefault; - })(); - - return FieldOptions; - })(); - - protobuf.OneofOptions = (function() { - - /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption - */ - - /** - * Constructs a new OneofOptions. - * @memberof google.protobuf - * @classdesc Represents an OneofOptions. - * @implements IOneofOptions - * @constructor - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - */ - function OneofOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.features = null; - - /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - * @returns {google.protobuf.OneofOptions} OneofOptions instance - */ - OneofOptions.create = function create(properties) { - return new OneofOptions(properties); - }; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofOptions message. - * @function verify - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions - */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) - return object; - var message = new $root.google.protobuf.OneofOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.OneofOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.OneofOptions} message OneofOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.features = null; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this OneofOptions to JSON. - * @function toJSON - * @memberof google.protobuf.OneofOptions - * @instance - * @returns {Object.} JSON object - */ - OneofOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofOptions - * @function getTypeUrl - * @memberof google.protobuf.OneofOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofOptions"; - }; - - return OneofOptions; - })(); - - protobuf.EnumOptions = (function() { - - /** - * Properties of an EnumOptions. - * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features - * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption - */ - - /** - * Constructs a new EnumOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumOptions. - * @implements IEnumOptions - * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - */ - function EnumOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allowAlias = false; - - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; - - /** - * EnumOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * EnumOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.features = null; - - /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumOptions} EnumOptions instance - */ - EnumOptions.create = function create(properties) { - return new EnumOptions(properties); - }; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.allowAlias = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 6: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 7: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumOptions message. - * @function verify - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - if (typeof message.allowAlias !== "boolean") - return "allowAlias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions - */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) - return object; - var message = new $root.google.protobuf.EnumOptions(); - if (object.allowAlias != null) - message.allowAlias = Boolean(object.allowAlias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.EnumOptions} message EnumOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.allowAlias = false; - object.deprecated = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumOptions - * @instance - * @returns {Object.} JSON object - */ - EnumOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumOptions"; - }; - - return EnumOptions; - })(); - - protobuf.EnumValueOptions = (function() { - - /** - * Properties of an EnumValueOptions. - * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features - * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption - */ - - /** - * Constructs a new EnumValueOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions - * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - */ - function EnumValueOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.deprecated = false; - - /** - * EnumValueOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.features = null; - - /** - * EnumValueOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.debugRedact = false; - - /** - * EnumValueOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance - */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); - }; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.deprecated = reader.bool(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.debugRedact = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueOptions message. - * @function verify - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) - return object; - var message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object.debugRedact = false; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumValueOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueOptions - * @instance - * @returns {Object.} JSON object - */ - EnumValueOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; - }; - - return EnumValueOptions; - })(); - - protobuf.ServiceOptions = (function() { - - /** - * Properties of a ServiceOptions. - * @memberof google.protobuf - * @interface IServiceOptions - * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features - * @property {boolean|null} [deprecated] ServiceOptions deprecated - * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption - * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost - * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes - * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion - */ - - /** - * Constructs a new ServiceOptions. - * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions - * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - */ - function ServiceOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.features = null; - - /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.deprecated = false; - - /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; - - /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; - - /** - * ServiceOptions .google.api.apiVersion. - * @member {string} .google.api.apiVersion - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.apiVersion"] = ""; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance - */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); - }; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) - writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); - if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) - writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); - if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) - writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); - return writer; - }; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 34: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 33: { - message.deprecated = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1049: { - message[".google.api.defaultHost"] = reader.string(); - break; - } - case 1050: { - message[".google.api.oauthScopes"] = reader.string(); - break; - } - case 525000001: { - message[".google.api.apiVersion"] = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceOptions message. - * @function verify - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - if (!$util.isString(message[".google.api.defaultHost"])) - return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - if (!$util.isString(message[".google.api.oauthScopes"])) - return ".google.api.oauthScopes: string expected"; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - if (!$util.isString(message[".google.api.apiVersion"])) - return ".google.api.apiVersion: string expected"; - return null; - }; - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions - */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) - return object; - var message = new $root.google.protobuf.ServiceOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.defaultHost"] != null) - message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); - if (object[".google.api.oauthScopes"] != null) - message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); - if (object[".google.api.apiVersion"] != null) - message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); - return message; - }; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; - object[".google.api.apiVersion"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; - return object; - }; - - /** - * Converts this ServiceOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceOptions - * @instance - * @returns {Object.} JSON object - */ - ServiceOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceOptions - * @function getTypeUrl - * @memberof google.protobuf.ServiceOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceOptions"; - }; - - return ServiceOptions; - })(); - - protobuf.MethodOptions = (function() { - - /** - * Properties of a MethodOptions. - * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel - * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features - * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature - * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo - */ - - /** - * Constructs a new MethodOptions. - * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions - * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.idempotencyLevel = 0; - - /** - * MethodOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.features = null; - - /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; - - /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; - - /** - * MethodOptions .google.longrunning.operationInfo. - * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.longrunning.operationInfo"] = null; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance - */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); - }; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) - $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 33: { - message.deprecated = reader.bool(); - break; - } - case 34: { - message.idempotencyLevel = reader.int32(); - break; - } - case 35: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 72295728: { - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - } - case 1051: { - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; - } - case 1049: { - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodOptions message. - * @function verify - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - switch (message.idempotencyLevel) { - default: - return "idempotencyLevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { - var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); - if (error) - return ".google.longrunning.operationInfo." + error; - } - return null; - }; - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions - */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) - return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - switch (object.idempotencyLevel) { - default: - if (typeof object.idempotencyLevel === "number") { - message.idempotencyLevel = object.idempotencyLevel; - break; - } - break; - case "IDEMPOTENCY_UNKNOWN": - case 0: - message.idempotencyLevel = 0; - break; - case "NO_SIDE_EFFECTS": - case 1: - message.idempotencyLevel = 1; - break; - case "IDEMPOTENT": - case 2: - message.idempotencyLevel = 2; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MethodOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } - if (object[".google.longrunning.operationInfo"] != null) { - if (typeof object[".google.longrunning.operationInfo"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); - } - return message; - }; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.MethodOptions} message MethodOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } - if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object.features = null; - object[".google.longrunning.operationInfo"] = null; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) - object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); - return object; - }; - - /** - * Converts this MethodOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MethodOptions - * @instance - * @returns {Object.} JSON object - */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodOptions - * @function getTypeUrl - * @memberof google.protobuf.MethodOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodOptions"; - }; - - /** - * IdempotencyLevel enum. - * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {number} - * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value - * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value - * @property {number} IDEMPOTENT=2 IDEMPOTENT value - */ - MethodOptions.IdempotencyLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; - values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; - values[valuesById[2] = "IDEMPOTENT"] = 2; - return values; - })(); - - return MethodOptions; - })(); - - protobuf.UninterpretedOption = (function() { - - /** - * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue - */ - - /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption - * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - */ - function UninterpretedOption(properties) { - this.name = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; - - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; - - /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.doubleValue = 0; - - /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); - - /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregateValue = ""; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance - */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); - }; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.name.length) - for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); - return writer; - }; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - } - case 3: { - message.identifierValue = reader.string(); - break; - } - case 4: { - message.positiveIntValue = reader.uint64(); - break; - } - case 5: { - message.negativeIntValue = reader.int64(); - break; - } - case 6: { - message.doubleValue = reader.double(); - break; - } - case 7: { - message.stringValue = reader.bytes(); - break; - } - case 8: { - message.aggregateValue = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UninterpretedOption message. - * @function verify - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UninterpretedOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) - return "name: array expected"; - for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); - if (error) - return "name." + error; - } - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - if (!$util.isString(message.identifierValue)) - return "identifierValue: string expected"; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) - return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) - return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) - return "stringValue: buffer expected"; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - if (!$util.isString(message.aggregateValue)) - return "aggregateValue: string expected"; - return null; - }; - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) - return object; - var message = new $root.google.protobuf.UninterpretedOption(); - if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; - for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); - } - } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); - if (object.negativeIntValue != null) - if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; - else if (typeof object.negativeIntValue === "string") - message.negativeIntValue = parseInt(object.negativeIntValue, 10); - else if (typeof object.negativeIntValue === "number") - message.negativeIntValue = object.negativeIntValue; - else if (typeof object.negativeIntValue === "object") - message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - if (typeof object.stringValue === "string") - $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length >= 0) - message.stringValue = object.stringValue; - if (object.aggregateValue != null) - message.aggregateValue = String(object.aggregateValue); - return message; - }; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UninterpretedOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.name = []; - if (options.defaults) { - object.identifierValue = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positiveIntValue = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negativeIntValue = options.longs === String ? "0" : 0; - object.doubleValue = 0; - if (options.bytes === String) - object.stringValue = ""; - else { - object.stringValue = []; - if (options.bytes !== Array) - object.stringValue = $util.newBuffer(object.stringValue); - } - object.aggregateValue = ""; - } - if (message.name && message.name.length) { - object.name = []; - for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") - object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; - else - object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (typeof message.negativeIntValue === "number") - object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; - else - object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - object.aggregateValue = message.aggregateValue; - return object; - }; - - /** - * Converts this UninterpretedOption to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption - * @instance - * @returns {Object.} JSON object - */ - UninterpretedOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UninterpretedOption - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; - }; - - UninterpretedOption.NamePart = (function() { - - /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension - */ - - /** - * Constructs a new NamePart. - * @memberof google.protobuf.UninterpretedOption - * @classdesc Represents a NamePart. - * @implements INamePart - * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - */ - function NamePart(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.namePart = ""; - - /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.isExtension = false; - - /** - * Creates a new NamePart instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance - */ - NamePart.create = function create(properties) { - return new NamePart(properties); - }; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); - return writer; - }; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.namePart = reader.string(); - break; - } - case 2: { - message.isExtension = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("namePart")) - throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!message.hasOwnProperty("isExtension")) - throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); - return message; - }; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NamePart message. - * @function verify - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NamePart.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (!$util.isString(message.namePart)) - return "namePart: string expected"; - if (typeof message.isExtension !== "boolean") - return "isExtension: boolean expected"; - return null; - }; - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - */ - NamePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) - return object; - var message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.namePart != null) - message.namePart = String(object.namePart); - if (object.isExtension != null) - message.isExtension = Boolean(object.isExtension); - return message; - }; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NamePart.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.namePart = ""; - object.isExtension = false; - } - if (message.namePart != null && message.hasOwnProperty("namePart")) - object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) - object.isExtension = message.isExtension; - return object; - }; - - /** - * Converts this NamePart to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - * @returns {Object.} JSON object - */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NamePart - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; - }; - - return NamePart; - })(); - - return UninterpretedOption; - })(); - - protobuf.FeatureSet = (function() { - - /** - * Properties of a FeatureSet. - * @memberof google.protobuf - * @interface IFeatureSet - * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence - * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType - * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding - * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation - * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding - * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat - */ - - /** - * Constructs a new FeatureSet. - * @memberof google.protobuf - * @classdesc Represents a FeatureSet. - * @implements IFeatureSet - * @constructor - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - */ - function FeatureSet(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSet fieldPresence. - * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.fieldPresence = 0; - - /** - * FeatureSet enumType. - * @member {google.protobuf.FeatureSet.EnumType} enumType - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.enumType = 0; - - /** - * FeatureSet repeatedFieldEncoding. - * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.repeatedFieldEncoding = 0; - - /** - * FeatureSet utf8Validation. - * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.utf8Validation = 0; - - /** - * FeatureSet messageEncoding. - * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.messageEncoding = 0; - - /** - * FeatureSet jsonFormat. - * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.jsonFormat = 0; - - /** - * Creates a new FeatureSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - * @returns {google.protobuf.FeatureSet} FeatureSet instance - */ - FeatureSet.create = function create(properties) { - return new FeatureSet(properties); - }; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); - if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); - if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); - if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); - if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); - return writer; - }; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.fieldPresence = reader.int32(); - break; - } - case 2: { - message.enumType = reader.int32(); - break; - } - case 3: { - message.repeatedFieldEncoding = reader.int32(); - break; - } - case 4: { - message.utf8Validation = reader.int32(); - break; - } - case 5: { - message.messageEncoding = reader.int32(); - break; - } - case 6: { - message.jsonFormat = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSet message. - * @function verify - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - switch (message.fieldPresence) { - default: - return "fieldPresence: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.enumType != null && message.hasOwnProperty("enumType")) - switch (message.enumType) { - default: - return "enumType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - switch (message.repeatedFieldEncoding) { - default: - return "repeatedFieldEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - switch (message.utf8Validation) { - default: - return "utf8Validation: enum value expected"; - case 0: - case 2: - case 3: - break; - } - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - switch (message.messageEncoding) { - default: - return "messageEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - switch (message.jsonFormat) { - default: - return "jsonFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSet} FeatureSet - */ - FeatureSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSet) - return object; - var message = new $root.google.protobuf.FeatureSet(); - switch (object.fieldPresence) { - default: - if (typeof object.fieldPresence === "number") { - message.fieldPresence = object.fieldPresence; - break; - } - break; - case "FIELD_PRESENCE_UNKNOWN": - case 0: - message.fieldPresence = 0; - break; - case "EXPLICIT": - case 1: - message.fieldPresence = 1; - break; - case "IMPLICIT": - case 2: - message.fieldPresence = 2; - break; - case "LEGACY_REQUIRED": - case 3: - message.fieldPresence = 3; - break; - } - switch (object.enumType) { - default: - if (typeof object.enumType === "number") { - message.enumType = object.enumType; - break; - } - break; - case "ENUM_TYPE_UNKNOWN": - case 0: - message.enumType = 0; - break; - case "OPEN": - case 1: - message.enumType = 1; - break; - case "CLOSED": - case 2: - message.enumType = 2; - break; - } - switch (object.repeatedFieldEncoding) { - default: - if (typeof object.repeatedFieldEncoding === "number") { - message.repeatedFieldEncoding = object.repeatedFieldEncoding; - break; - } - break; - case "REPEATED_FIELD_ENCODING_UNKNOWN": - case 0: - message.repeatedFieldEncoding = 0; - break; - case "PACKED": - case 1: - message.repeatedFieldEncoding = 1; - break; - case "EXPANDED": - case 2: - message.repeatedFieldEncoding = 2; - break; - } - switch (object.utf8Validation) { - default: - if (typeof object.utf8Validation === "number") { - message.utf8Validation = object.utf8Validation; - break; - } - break; - case "UTF8_VALIDATION_UNKNOWN": - case 0: - message.utf8Validation = 0; - break; - case "VERIFY": - case 2: - message.utf8Validation = 2; - break; - case "NONE": - case 3: - message.utf8Validation = 3; - break; - } - switch (object.messageEncoding) { - default: - if (typeof object.messageEncoding === "number") { - message.messageEncoding = object.messageEncoding; - break; - } - break; - case "MESSAGE_ENCODING_UNKNOWN": - case 0: - message.messageEncoding = 0; - break; - case "LENGTH_PREFIXED": - case 1: - message.messageEncoding = 1; - break; - case "DELIMITED": - case 2: - message.messageEncoding = 2; - break; - } - switch (object.jsonFormat) { - default: - if (typeof object.jsonFormat === "number") { - message.jsonFormat = object.jsonFormat; - break; - } - break; - case "JSON_FORMAT_UNKNOWN": - case 0: - message.jsonFormat = 0; - break; - case "ALLOW": - case 1: - message.jsonFormat = 1; - break; - case "LEGACY_BEST_EFFORT": - case 2: - message.jsonFormat = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.FeatureSet} message FeatureSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; - object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; - object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; - object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; - object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; - object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; - } - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; - if (message.enumType != null && message.hasOwnProperty("enumType")) - object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; - return object; - }; - - /** - * Converts this FeatureSet to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSet - * @instance - * @returns {Object.} JSON object - */ - FeatureSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSet - * @function getTypeUrl - * @memberof google.protobuf.FeatureSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSet"; - }; - - /** - * FieldPresence enum. - * @name google.protobuf.FeatureSet.FieldPresence - * @enum {number} - * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value - * @property {number} EXPLICIT=1 EXPLICIT value - * @property {number} IMPLICIT=2 IMPLICIT value - * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value - */ - FeatureSet.FieldPresence = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; - values[valuesById[1] = "EXPLICIT"] = 1; - values[valuesById[2] = "IMPLICIT"] = 2; - values[valuesById[3] = "LEGACY_REQUIRED"] = 3; - return values; - })(); - - /** - * EnumType enum. - * @name google.protobuf.FeatureSet.EnumType - * @enum {number} - * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value - * @property {number} OPEN=1 OPEN value - * @property {number} CLOSED=2 CLOSED value - */ - FeatureSet.EnumType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "OPEN"] = 1; - values[valuesById[2] = "CLOSED"] = 2; - return values; - })(); - - /** - * RepeatedFieldEncoding enum. - * @name google.protobuf.FeatureSet.RepeatedFieldEncoding - * @enum {number} - * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value - * @property {number} PACKED=1 PACKED value - * @property {number} EXPANDED=2 EXPANDED value - */ - FeatureSet.RepeatedFieldEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "PACKED"] = 1; - values[valuesById[2] = "EXPANDED"] = 2; - return values; - })(); - - /** - * Utf8Validation enum. - * @name google.protobuf.FeatureSet.Utf8Validation - * @enum {number} - * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value - * @property {number} VERIFY=2 VERIFY value - * @property {number} NONE=3 NONE value - */ - FeatureSet.Utf8Validation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; - values[valuesById[2] = "VERIFY"] = 2; - values[valuesById[3] = "NONE"] = 3; - return values; - })(); - - /** - * MessageEncoding enum. - * @name google.protobuf.FeatureSet.MessageEncoding - * @enum {number} - * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value - * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value - * @property {number} DELIMITED=2 DELIMITED value - */ - FeatureSet.MessageEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "LENGTH_PREFIXED"] = 1; - values[valuesById[2] = "DELIMITED"] = 2; - return values; - })(); - - /** - * JsonFormat enum. - * @name google.protobuf.FeatureSet.JsonFormat - * @enum {number} - * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value - * @property {number} ALLOW=1 ALLOW value - * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value - */ - FeatureSet.JsonFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; - values[valuesById[1] = "ALLOW"] = 1; - values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; - return values; - })(); - - return FeatureSet; - })(); - - protobuf.FeatureSetDefaults = (function() { - - /** - * Properties of a FeatureSetDefaults. - * @memberof google.protobuf - * @interface IFeatureSetDefaults - * @property {Array.|null} [defaults] FeatureSetDefaults defaults - * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition - * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition - */ - - /** - * Constructs a new FeatureSetDefaults. - * @memberof google.protobuf - * @classdesc Represents a FeatureSetDefaults. - * @implements IFeatureSetDefaults - * @constructor - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - */ - function FeatureSetDefaults(properties) { - this.defaults = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetDefaults defaults. - * @member {Array.} defaults - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.defaults = $util.emptyArray; - - /** - * FeatureSetDefaults minimumEdition. - * @member {google.protobuf.Edition} minimumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.minimumEdition = 0; - - /** - * FeatureSetDefaults maximumEdition. - * @member {google.protobuf.Edition} maximumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.maximumEdition = 0; - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance - */ - FeatureSetDefaults.create = function create(properties) { - return new FeatureSetDefaults(properties); - }; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.defaults != null && message.defaults.length) - for (var i = 0; i < message.defaults.length; ++i) - $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); - if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); - return writer; - }; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.defaults && message.defaults.length)) - message.defaults = []; - message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); - break; - } - case 4: { - message.minimumEdition = reader.int32(); - break; - } - case 5: { - message.maximumEdition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetDefaults message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetDefaults.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.defaults != null && message.hasOwnProperty("defaults")) { - if (!Array.isArray(message.defaults)) - return "defaults: array expected"; - for (var i = 0; i < message.defaults.length; ++i) { - var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); - if (error) - return "defaults." + error; - } - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - switch (message.minimumEdition) { - default: - return "minimumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - switch (message.maximumEdition) { - default: - return "maximumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - */ - FeatureSetDefaults.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults(); - if (object.defaults) { - if (!Array.isArray(object.defaults)) - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); - message.defaults = []; - for (var i = 0; i < object.defaults.length; ++i) { - if (typeof object.defaults[i] !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); - message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); - } - } - switch (object.minimumEdition) { - default: - if (typeof object.minimumEdition === "number") { - message.minimumEdition = object.minimumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.minimumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.minimumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.minimumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.minimumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.minimumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.minimumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.minimumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.minimumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.minimumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.minimumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.minimumEdition = 2147483647; - break; - } - switch (object.maximumEdition) { - default: - if (typeof object.maximumEdition === "number") { - message.maximumEdition = object.maximumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.maximumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.maximumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.maximumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.maximumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.maximumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.maximumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.maximumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.maximumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.maximumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.maximumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.maximumEdition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetDefaults.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.defaults = []; - if (options.defaults) { - object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.defaults && message.defaults.length) { - object.defaults = []; - for (var j = 0; j < message.defaults.length; ++j) - object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; - return object; - }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults - * @instance - * @returns {Object.} JSON object - */ - FeatureSetDefaults.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetDefaults - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; - }; - - FeatureSetDefaults.FeatureSetEditionDefault = (function() { - - /** - * Properties of a FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @interface IFeatureSetEditionDefault - * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features - */ - - /** - * Constructs a new FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @classdesc Represents a FeatureSetEditionDefault. - * @implements IFeatureSetEditionDefault - * @constructor - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - */ - function FeatureSetEditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetEditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.edition = 0; - - /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.features = null; - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance - */ - FeatureSetEditionDefault.create = function create(properties) { - return new FeatureSetEditionDefault(properties); - }; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetEditionDefault message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetEditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - return null; - }; - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - */ - FeatureSetEditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetEditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.features = null; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - * @returns {Object.} JSON object - */ - FeatureSetEditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; - }; - - return FeatureSetEditionDefault; - })(); - - return FeatureSetDefaults; - })(); - - protobuf.SourceCodeInfo = (function() { - - /** - * Properties of a SourceCodeInfo. - * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location - */ - - /** - * Constructs a new SourceCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo - * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - */ - function SourceCodeInfo(properties) { - this.location = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo - * @instance - */ - SourceCodeInfo.prototype.location = $util.emptyArray; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance - */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); - }; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.location != null && message.location.length) - for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceCodeInfo message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SourceCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) - return "location: array expected"; - for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); - if (error) - return "location." + error; - } - } - return null; - }; - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) - return object; - var message = new $root.google.protobuf.SourceCodeInfo(); - if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; - for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); - } - return object; - }; - - /** - * Converts this SourceCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo - * @instance - * @returns {Object.} JSON object - */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SourceCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; - }; - - SourceCodeInfo.Location = (function() { - - /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments - */ - - /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - */ - function Location(properties) { - this.path = []; - this.span = []; - this.leadingDetachedComments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; - - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; - - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; - - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; - - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; - - /** - * Creates a new Location instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance - */ - Location.create = function create(properties) { - return new Location(properties); - }; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); - if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); - return writer; - }; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - } - case 3: { - message.leadingComments = reader.string(); - break; - } - case 4: { - message.trailingComments = reader.string(); - break; - } - case 6: { - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Location message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Location.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) - return "span: array expected"; - for (var i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - if (!$util.isString(message.leadingComments)) - return "leadingComments: string expected"; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - if (!$util.isString(message.trailingComments)) - return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { - if (!Array.isArray(message.leadingDetachedComments)) - return "leadingDetachedComments: array expected"; - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - if (!$util.isString(message.leadingDetachedComments[i])) - return "leadingDetachedComments: string[] expected"; - } - return null; - }; - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) - return object; - var message = new $root.google.protobuf.SourceCodeInfo.Location(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; - for (var i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leadingComments != null) - message.leadingComments = String(object.leadingComments); - if (object.trailingComments != null) - message.trailingComments = String(object.trailingComments); - if (object.leadingDetachedComments) { - if (!Array.isArray(object.leadingDetachedComments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); - message.leadingDetachedComments = []; - for (var i = 0; i < object.leadingDetachedComments.length; ++i) - message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); - } - return message; - }; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Location.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leadingDetachedComments = []; - } - if (options.defaults) { - object.leadingComments = ""; - object.trailingComments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.span && message.span.length) { - object.span = []; - for (var j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - object.trailingComments = message.trailingComments; - if (message.leadingDetachedComments && message.leadingDetachedComments.length) { - object.leadingDetachedComments = []; - for (var j = 0; j < message.leadingDetachedComments.length; ++j) - object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; - } - return object; - }; - - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Location - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; - }; - - return Location; - })(); - - return SourceCodeInfo; - })(); - - protobuf.GeneratedCodeInfo = (function() { - - /** - * Properties of a GeneratedCodeInfo. - * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation - */ - - /** - * Constructs a new GeneratedCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo - * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - */ - function GeneratedCodeInfo(properties) { - this.annotation = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance - */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); - }; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.annotation != null && message.annotation.length) - for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GeneratedCodeInfo message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GeneratedCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { - if (!Array.isArray(message.annotation)) - return "annotation: array expected"; - for (var i = 0; i < message.annotation.length; ++i) { - var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); - if (error) - return "annotation." + error; - } - } - return null; - }; - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo(); - if (object.annotation) { - if (!Array.isArray(object.annotation)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); - message.annotation = []; - for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GeneratedCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); - } - return object; - }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - * @returns {Object.} JSON object - */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; - }; - - GeneratedCodeInfo.Annotation = (function() { - - /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end - * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic - */ - - /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation - * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - */ - function Annotation(properties) { - this.path = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; - - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; - - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; - - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; - - /** - * Annotation semantic. - * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.semantic = 0; - - /** - * Creates a new Annotation instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance - */ - Annotation.create = function create(properties) { - return new Annotation(properties); - }; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); - if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); - return writer; - }; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - message.sourceFile = reader.string(); - break; - } - case 3: { - message.begin = reader.int32(); - break; - } - case 4: { - message.end = reader.int32(); - break; - } - case 5: { - message.semantic = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Annotation message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Annotation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - if (!$util.isString(message.sourceFile)) - return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) - if (!$util.isInteger(message.begin)) - return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.semantic != null && message.hasOwnProperty("semantic")) - switch (message.semantic) { - default: - return "semantic: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - switch (object.semantic) { - default: - if (typeof object.semantic === "number") { - message.semantic = object.semantic; - break; - } - break; - case "NONE": - case 0: - message.semantic = 0; - break; - case "SET": - case 1: - message.semantic = 1; - break; - case "ALIAS": - case 2: - message.semantic = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - object.semantic = options.enums === String ? "NONE" : 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; - return object; - }; - - /** - * Converts this Annotation to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - * @returns {Object.} JSON object - */ - Annotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Annotation - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; - }; - - /** - * Semantic enum. - * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} SET=1 SET value - * @property {number} ALIAS=2 ALIAS value - */ - Annotation.Semantic = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "SET"] = 1; - values[valuesById[2] = "ALIAS"] = 2; - return values; - })(); - - return Annotation; - })(); - - return GeneratedCodeInfo; - })(); - - protobuf.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.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Duration - * @function getTypeUrl - * @memberof google.protobuf.Duration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Duration"; - }; - - return Duration; - })(); - - protobuf.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.Any = (function() { - - /** - * Properties of an Any. - * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value - */ - - /** - * Constructs a new Any. - * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny - * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set - */ - function Any(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.type_url = ""; - - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.value = $util.newBuffer([]); - - /** - * Creates a new Any instance using the specified properties. - * @function create - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance - */ - Any.create = function create(properties) { - return new Any(properties); - }; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - return writer; - }; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Any message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type_url = reader.string(); - break; - } - case 2: { - message.value = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Any message. - * @function verify - * @memberof google.protobuf.Any - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Any.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type_url != null && message.hasOwnProperty("type_url")) - if (!$util.isString(message.type_url)) - return "type_url: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - return null; - }; - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Any - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any - */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) - return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length >= 0) - message.value = object.value; - return message; - }; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.Any} message Any - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Any.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.type_url != null && message.hasOwnProperty("type_url")) - object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; - - /** - * Converts this Any to JSON. - * @function toJSON - * @memberof google.protobuf.Any - * @instance - * @returns {Object.} JSON object - */ - Any.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Any - * @function getTypeUrl - * @memberof google.protobuf.Any - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Any"; - }; - - return Any; - })(); - - protobuf.Empty = (function() { - - /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty - */ - - /** - * Constructs a new Empty. - * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty - * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set - */ - function Empty(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new Empty instance using the specified properties. - * @function create - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance - */ - Empty.create = function create(properties) { - return new Empty(properties); - }; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Empty message. - * @function verify - * @memberof google.protobuf.Empty - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Empty.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Empty - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty - */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) - return object; - return new $root.google.protobuf.Empty(); - }; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.Empty} message Empty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Empty.toObject = function toObject() { - return {}; - }; - - /** - * Converts this Empty to JSON. - * @function toJSON - * @memberof google.protobuf.Empty - * @instance - * @returns {Object.} JSON object - */ - Empty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Empty - * @function getTypeUrl - * @memberof google.protobuf.Empty - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Empty"; - }; - - return Empty; - })(); - - 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; - })(); - - google.longrunning = (function() { - - /** - * Namespace longrunning. - * @memberof google - * @namespace - */ - var longrunning = {}; - - longrunning.Operations = (function() { - - /** - * Constructs a new Operations service. - * @memberof google.longrunning - * @classdesc Represents an Operations - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Operations(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; - - /** - * Creates new Operations service using the specified rpc implementation. - * @function create - * @memberof google.longrunning.Operations - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. - */ - Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.longrunning.Operations|listOperations}. - * @memberof google.longrunning.Operations - * @typedef ListOperationsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse - */ - - /** - * Calls ListOperations. - * @function listOperations - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object - * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { - return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); - }, "name", { value: "ListOperations" }); - - /** - * Calls ListOperations. - * @function listOperations - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|getOperation}. - * @memberof google.longrunning.Operations - * @typedef GetOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls GetOperation. - * @function getOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object - * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { - return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "GetOperation" }); - - /** - * Calls GetOperation. - * @function getOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|deleteOperation}. - * @memberof google.longrunning.Operations - * @typedef DeleteOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteOperation. - * @function deleteOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object - * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { - return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteOperation" }); - - /** - * Calls DeleteOperation. - * @function deleteOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|cancelOperation}. - * @memberof google.longrunning.Operations - * @typedef CancelOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls CancelOperation. - * @function cancelOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object - * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { - return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "CancelOperation" }); - - /** - * Calls CancelOperation. - * @function cancelOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|waitOperation}. - * @memberof google.longrunning.Operations - * @typedef WaitOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls WaitOperation. - * @function waitOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object - * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { - return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "WaitOperation" }); - - /** - * Calls WaitOperation. - * @function waitOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Operations; - })(); - - longrunning.Operation = (function() { - - /** - * Properties of an Operation. - * @memberof google.longrunning - * @interface IOperation - * @property {string|null} [name] Operation name - * @property {google.protobuf.IAny|null} [metadata] Operation metadata - * @property {boolean|null} [done] Operation done - * @property {google.rpc.IStatus|null} [error] Operation error - * @property {google.protobuf.IAny|null} [response] Operation response - */ - - /** - * Constructs a new Operation. - * @memberof google.longrunning - * @classdesc Represents an Operation. - * @implements IOperation - * @constructor - * @param {google.longrunning.IOperation=} [properties] Properties to set - */ - function Operation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Operation name. - * @member {string} name - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.name = ""; - - /** - * Operation metadata. - * @member {google.protobuf.IAny|null|undefined} metadata - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.metadata = null; - - /** - * Operation done. - * @member {boolean} done - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.done = false; - - /** - * Operation error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.error = null; - - /** - * Operation response. - * @member {google.protobuf.IAny|null|undefined} response - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.response = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Operation result. - * @member {"error"|"response"|undefined} result - * @memberof google.longrunning.Operation - * @instance - */ - Object.defineProperty(Operation.prototype, "result", { - get: $util.oneOfGetter($oneOfFields = ["error", "response"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Operation instance using the specified properties. - * @function create - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation=} [properties] Properties to set - * @returns {google.longrunning.Operation} Operation instance - */ - Operation.create = function create(properties) { - return new Operation(properties); - }; - - /** - * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @function encode - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation} message Operation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Operation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.done != null && Object.hasOwnProperty.call(message, "done")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.response != null && Object.hasOwnProperty.call(message, "response")) - $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation} message Operation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Operation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Operation message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.Operation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.Operation} Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Operation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - } - case 3: { - message.done = reader.bool(); - break; - } - case 4: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 5: { - message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Operation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.Operation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.Operation} Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Operation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Operation message. - * @function verify - * @memberof google.longrunning.Operation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Operation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.protobuf.Any.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.done != null && message.hasOwnProperty("done")) - if (typeof message.done !== "boolean") - return "done: boolean expected"; - if (message.error != null && message.hasOwnProperty("error")) { - properties.result = 1; - { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - } - if (message.response != null && message.hasOwnProperty("response")) { - if (properties.result === 1) - return "result: multiple values"; - properties.result = 1; - { - var error = $root.google.protobuf.Any.verify(message.response); - if (error) - return "response." + error; - } - } - return null; - }; - - /** - * Creates an Operation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.Operation - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.Operation} Operation - */ - Operation.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.Operation) - return object; - var message = new $root.google.longrunning.Operation(); - if (object.name != null) - message.name = String(object.name); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.longrunning.Operation.metadata: object expected"); - message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); - } - if (object.done != null) - message.done = Boolean(object.done); - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.longrunning.Operation.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - if (object.response != null) { - if (typeof object.response !== "object") - throw TypeError(".google.longrunning.Operation.response: object expected"); - message.response = $root.google.protobuf.Any.fromObject(object.response); - } - return message; - }; - - /** - * Creates a plain object from an Operation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.Operation} message Operation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Operation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.metadata = null; - object.done = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); - if (message.done != null && message.hasOwnProperty("done")) - object.done = message.done; - if (message.error != null && message.hasOwnProperty("error")) { - object.error = $root.google.rpc.Status.toObject(message.error, options); - if (options.oneofs) - object.result = "error"; - } - if (message.response != null && message.hasOwnProperty("response")) { - object.response = $root.google.protobuf.Any.toObject(message.response, options); - if (options.oneofs) - object.result = "response"; - } - return object; - }; - - /** - * Converts this Operation to JSON. - * @function toJSON - * @memberof google.longrunning.Operation - * @instance - * @returns {Object.} JSON object - */ - Operation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Operation - * @function getTypeUrl - * @memberof google.longrunning.Operation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.Operation"; - }; - - return Operation; - })(); - - longrunning.GetOperationRequest = (function() { - - /** - * Properties of a GetOperationRequest. - * @memberof google.longrunning - * @interface IGetOperationRequest - * @property {string|null} [name] GetOperationRequest name - */ - - /** - * Constructs a new GetOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a GetOperationRequest. - * @implements IGetOperationRequest - * @constructor - * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set - */ - function GetOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetOperationRequest name. - * @member {string} name - * @memberof google.longrunning.GetOperationRequest - * @instance - */ - GetOperationRequest.prototype.name = ""; - - /** - * Creates a new GetOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance - */ - GetOperationRequest.create = function create(properties) { - return new GetOperationRequest(properties); - }; - - /** - * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetOperationRequest message. - * @function verify - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - */ - GetOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.GetOperationRequest) - return object; - var message = new $root.google.longrunning.GetOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.GetOperationRequest} message GetOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.GetOperationRequest - * @instance - * @returns {Object.} JSON object - */ - GetOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; - }; - - return GetOperationRequest; - })(); - - longrunning.ListOperationsRequest = (function() { - - /** - * Properties of a ListOperationsRequest. - * @memberof google.longrunning - * @interface IListOperationsRequest - * @property {string|null} [name] ListOperationsRequest name - * @property {string|null} [filter] ListOperationsRequest filter - * @property {number|null} [pageSize] ListOperationsRequest pageSize - * @property {string|null} [pageToken] ListOperationsRequest pageToken - */ - - /** - * Constructs a new ListOperationsRequest. - * @memberof google.longrunning - * @classdesc Represents a ListOperationsRequest. - * @implements IListOperationsRequest - * @constructor - * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set - */ - function ListOperationsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListOperationsRequest name. - * @member {string} name - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.name = ""; - - /** - * ListOperationsRequest filter. - * @member {string} filter - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.filter = ""; - - /** - * ListOperationsRequest pageSize. - * @member {number} pageSize - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.pageSize = 0; - - /** - * ListOperationsRequest pageToken. - * @member {string} pageToken - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListOperationsRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance - */ - ListOperationsRequest.create = function create(properties) { - return new ListOperationsRequest(properties); - }; - - /** - * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); - return writer; - }; - - /** - * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: { - message.name = reader.string(); - break; - } - case 1: { - message.filter = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListOperationsRequest message. - * @function verify - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOperationsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - */ - ListOperationsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.ListOperationsRequest) - return object; - var message = new $root.google.longrunning.ListOperationsRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.filter != null) - message.filter = String(object.filter); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOperationsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; - object.name = ""; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this ListOperationsRequest to JSON. - * @function toJSON - * @memberof google.longrunning.ListOperationsRequest - * @instance - * @returns {Object.} JSON object - */ - ListOperationsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListOperationsRequest - * @function getTypeUrl - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; - }; - - return ListOperationsRequest; - })(); - - longrunning.ListOperationsResponse = (function() { - - /** - * Properties of a ListOperationsResponse. - * @memberof google.longrunning - * @interface IListOperationsResponse - * @property {Array.|null} [operations] ListOperationsResponse operations - * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken - */ - - /** - * Constructs a new ListOperationsResponse. - * @memberof google.longrunning - * @classdesc Represents a ListOperationsResponse. - * @implements IListOperationsResponse - * @constructor - * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set - */ - function ListOperationsResponse(properties) { - this.operations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListOperationsResponse operations. - * @member {Array.} operations - * @memberof google.longrunning.ListOperationsResponse - * @instance - */ - ListOperationsResponse.prototype.operations = $util.emptyArray; - - /** - * ListOperationsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.longrunning.ListOperationsResponse - * @instance - */ - ListOperationsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListOperationsResponse instance using the specified properties. - * @function create - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance - */ - ListOperationsResponse.create = function create(properties) { - return new ListOperationsResponse(properties); - }; - - /** - * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @function encode - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.operations != null && message.operations.length) - for (var i = 0; i < message.operations.length; ++i) - $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.operations && message.operations.length)) - message.operations = []; - message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListOperationsResponse message. - * @function verify - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOperationsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.operations != null && message.hasOwnProperty("operations")) { - if (!Array.isArray(message.operations)) - return "operations: array expected"; - for (var i = 0; i < message.operations.length; ++i) { - var error = $root.google.longrunning.Operation.verify(message.operations[i]); - if (error) - return "operations." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - */ - ListOperationsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.ListOperationsResponse) - return object; - var message = new $root.google.longrunning.ListOperationsResponse(); - if (object.operations) { - if (!Array.isArray(object.operations)) - throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); - message.operations = []; - for (var i = 0; i < object.operations.length; ++i) { - if (typeof object.operations[i] !== "object") - throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); - message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOperationsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.operations = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.operations && message.operations.length) { - object.operations = []; - for (var j = 0; j < message.operations.length; ++j) - object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListOperationsResponse to JSON. - * @function toJSON - * @memberof google.longrunning.ListOperationsResponse - * @instance - * @returns {Object.} JSON object - */ - ListOperationsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListOperationsResponse - * @function getTypeUrl - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; - }; - - return ListOperationsResponse; - })(); - - longrunning.CancelOperationRequest = (function() { - - /** - * Properties of a CancelOperationRequest. - * @memberof google.longrunning - * @interface ICancelOperationRequest - * @property {string|null} [name] CancelOperationRequest name - */ - - /** - * Constructs a new CancelOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a CancelOperationRequest. - * @implements ICancelOperationRequest - * @constructor - * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set - */ - function CancelOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CancelOperationRequest name. - * @member {string} name - * @memberof google.longrunning.CancelOperationRequest - * @instance - */ - CancelOperationRequest.prototype.name = ""; - - /** - * Creates a new CancelOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance - */ - CancelOperationRequest.create = function create(properties) { - return new CancelOperationRequest(properties); - }; - - /** - * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CancelOperationRequest message. - * @function verify - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CancelOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - */ - CancelOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.CancelOperationRequest) - return object; - var message = new $root.google.longrunning.CancelOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CancelOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this CancelOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.CancelOperationRequest - * @instance - * @returns {Object.} JSON object - */ - CancelOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CancelOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; - }; - - return CancelOperationRequest; - })(); - - longrunning.DeleteOperationRequest = (function() { - - /** - * Properties of a DeleteOperationRequest. - * @memberof google.longrunning - * @interface IDeleteOperationRequest - * @property {string|null} [name] DeleteOperationRequest name - */ - - /** - * Constructs a new DeleteOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a DeleteOperationRequest. - * @implements IDeleteOperationRequest - * @constructor - * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set - */ - function DeleteOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteOperationRequest name. - * @member {string} name - * @memberof google.longrunning.DeleteOperationRequest - * @instance - */ - DeleteOperationRequest.prototype.name = ""; - - /** - * Creates a new DeleteOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance - */ - DeleteOperationRequest.create = function create(properties) { - return new DeleteOperationRequest(properties); - }; - - /** - * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteOperationRequest message. - * @function verify - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - */ - DeleteOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.DeleteOperationRequest) - return object; - var message = new $root.google.longrunning.DeleteOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.DeleteOperationRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; - }; - - return DeleteOperationRequest; - })(); - - longrunning.WaitOperationRequest = (function() { - - /** - * Properties of a WaitOperationRequest. - * @memberof google.longrunning - * @interface IWaitOperationRequest - * @property {string|null} [name] WaitOperationRequest name - * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout - */ - - /** - * Constructs a new WaitOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a WaitOperationRequest. - * @implements IWaitOperationRequest - * @constructor - * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set - */ - function WaitOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WaitOperationRequest name. - * @member {string} name - * @memberof google.longrunning.WaitOperationRequest - * @instance - */ - WaitOperationRequest.prototype.name = ""; - - /** - * WaitOperationRequest timeout. - * @member {google.protobuf.IDuration|null|undefined} timeout - * @memberof google.longrunning.WaitOperationRequest - * @instance - */ - WaitOperationRequest.prototype.timeout = null; - - /** - * Creates a new WaitOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance - */ - WaitOperationRequest.create = function create(properties) { - return new WaitOperationRequest(properties); - }; - - /** - * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WaitOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) - $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WaitOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WaitOperationRequest message. - * @function verify - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WaitOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.timeout != null && message.hasOwnProperty("timeout")) { - var error = $root.google.protobuf.Duration.verify(message.timeout); - if (error) - return "timeout." + error; - } - return null; - }; - - /** - * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - */ - WaitOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.WaitOperationRequest) - return object; - var message = new $root.google.longrunning.WaitOperationRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.timeout != null) { - if (typeof object.timeout !== "object") - throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); - message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); - } - return message; - }; - - /** - * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WaitOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.timeout = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.timeout != null && message.hasOwnProperty("timeout")) - object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); - return object; - }; - - /** - * Converts this WaitOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.WaitOperationRequest - * @instance - * @returns {Object.} JSON object - */ - WaitOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WaitOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; - }; - - return WaitOperationRequest; - })(); - - longrunning.OperationInfo = (function() { - - /** - * Properties of an OperationInfo. - * @memberof google.longrunning - * @interface IOperationInfo - * @property {string|null} [responseType] OperationInfo responseType - * @property {string|null} [metadataType] OperationInfo metadataType - */ - - /** - * Constructs a new OperationInfo. - * @memberof google.longrunning - * @classdesc Represents an OperationInfo. - * @implements IOperationInfo - * @constructor - * @param {google.longrunning.IOperationInfo=} [properties] Properties to set - */ - function OperationInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OperationInfo responseType. - * @member {string} responseType - * @memberof google.longrunning.OperationInfo - * @instance - */ - OperationInfo.prototype.responseType = ""; - - /** - * OperationInfo metadataType. - * @member {string} metadataType - * @memberof google.longrunning.OperationInfo - * @instance - */ - OperationInfo.prototype.metadataType = ""; - - /** - * Creates a new OperationInfo instance using the specified properties. - * @function create - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo=} [properties] Properties to set - * @returns {google.longrunning.OperationInfo} OperationInfo instance - */ - OperationInfo.create = function create(properties) { - return new OperationInfo(properties); - }; - - /** - * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @function encode - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); - if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); - return writer; - }; - - /** - * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OperationInfo message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.OperationInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.OperationInfo} OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.responseType = reader.string(); - break; - } - case 2: { - message.metadataType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OperationInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.OperationInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.OperationInfo} OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OperationInfo message. - * @function verify - * @memberof google.longrunning.OperationInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OperationInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.responseType != null && message.hasOwnProperty("responseType")) - if (!$util.isString(message.responseType)) - return "responseType: string expected"; - if (message.metadataType != null && message.hasOwnProperty("metadataType")) - if (!$util.isString(message.metadataType)) - return "metadataType: string expected"; - return null; - }; - - /** - * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.OperationInfo - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.OperationInfo} OperationInfo - */ - OperationInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.OperationInfo) - return object; - var message = new $root.google.longrunning.OperationInfo(); - if (object.responseType != null) - message.responseType = String(object.responseType); - if (object.metadataType != null) - message.metadataType = String(object.metadataType); - return message; - }; - - /** - * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.OperationInfo} message OperationInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperationInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.responseType = ""; - object.metadataType = ""; - } - if (message.responseType != null && message.hasOwnProperty("responseType")) - object.responseType = message.responseType; - if (message.metadataType != null && message.hasOwnProperty("metadataType")) - object.metadataType = message.metadataType; - return object; - }; - - /** - * Converts this OperationInfo to JSON. - * @function toJSON - * @memberof google.longrunning.OperationInfo - * @instance - * @returns {Object.} JSON object - */ - OperationInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OperationInfo - * @function getTypeUrl - * @memberof google.longrunning.OperationInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.OperationInfo"; - }; - - return OperationInfo; - })(); - - return longrunning; - })(); - - google.rpc = (function() { - - /** - * Namespace rpc. - * @memberof google - * @namespace - */ - var rpc = {}; - - rpc.Status = (function() { - - /** - * Properties of a Status. - * @memberof google.rpc - * @interface IStatus - * @property {number|null} [code] Status code - * @property {string|null} [message] Status message - * @property {Array.|null} [details] Status details - */ - - /** - * Constructs a new Status. - * @memberof google.rpc - * @classdesc Represents a Status. - * @implements IStatus - * @constructor - * @param {google.rpc.IStatus=} [properties] Properties to set - */ - function Status(properties) { - this.details = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Status code. - * @member {number} code - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.code = 0; - - /** - * Status message. - * @member {string} message - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.message = ""; - - /** - * Status details. - * @member {Array.} details - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.details = $util.emptyArray; - - /** - * Creates a new Status instance using the specified properties. - * @function create - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus=} [properties] Properties to set - * @returns {google.rpc.Status} Status instance - */ - Status.create = function create(properties) { - return new Status(properties); - }; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encode - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.details != null && message.details.length) - for (var i = 0; i < message.details.length; ++i) - $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Status message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.code = reader.int32(); - break; - } - case 2: { - message.message = reader.string(); - break; - } - case 3: { - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Status message. - * @function verify - * @memberof google.rpc.Status - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Status.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isInteger(message.code)) - return "code: integer expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.details != null && message.hasOwnProperty("details")) { - if (!Array.isArray(message.details)) - return "details: array expected"; - for (var i = 0; i < message.details.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.details[i]); - if (error) - return "details." + error; - } - } - return null; - }; - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.Status - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.Status} Status - */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.Status) - return object; - var message = new $root.google.rpc.Status(); - if (object.code != null) - message.code = object.code | 0; - if (object.message != null) - message.message = String(object.message); - if (object.details) { - if (!Array.isArray(object.details)) - throw TypeError(".google.rpc.Status.details: array expected"); - message.details = []; - for (var i = 0; i < object.details.length; ++i) { - if (typeof object.details[i] !== "object") - throw TypeError(".google.rpc.Status.details: object expected"); - message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.Status - * @static - * @param {google.rpc.Status} message Status - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Status.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.details = []; - if (options.defaults) { - object.code = 0; - object.message = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.details && message.details.length) { - object.details = []; - for (var j = 0; j < message.details.length; ++j) - object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); - } - return object; - }; - - /** - * Converts this Status to JSON. - * @function toJSON - * @memberof google.rpc.Status - * @instance - * @returns {Object.} JSON object - */ - Status.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Status - * @function getTypeUrl - * @memberof google.rpc.Status - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.Status"; - }; - - return Status; - })(); - - return rpc; - })(); - - return google; - })(); - - return $root; -}); diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/protos/protos.json b/owl-bot-staging/google-cloud-datacatalog/v1/protos/protos.json deleted file mode 100644 index 35a1b61d011..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/protos/protos.json +++ /dev/null @@ -1,6607 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "cloud": { - "nested": { - "datacatalog": { - "nested": { - "v1": { - "options": { - "csharp_namespace": "Google.Cloud.DataCatalog.V1", - "go_package": "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb", - "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, - "CLOUD_SPANNER": 6, - "CLOUD_BIGTABLE": 7, - "CLOUD_SQL": 8, - "LOOKER": 9, - "VERTEX_AI": 10 - } - }, - "ManagingSystem": { - "values": { - "MANAGING_SYSTEM_UNSPECIFIED": 0, - "MANAGING_SYSTEM_DATAPLEX": 1, - "MANAGING_SYSTEM_OTHER": 2 - } - }, - "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" - } - ] - }, - "ReconcileTags": { - "requestType": "ReconcileTagsRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags:reconcile", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "ReconcileTagsResponse", - "(google.longrunning.operation_info).metadata_type": "ReconcileTagsMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags:reconcile", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "ReconcileTagsResponse", - "metadata_type": "ReconcileTagsMetadata" - } - } - ] - }, - "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": "*" - } - ] - } - } - ] - }, - "ImportEntries": { - "requestType": "ImportEntriesRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries:import", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "ImportEntriesResponse", - "(google.longrunning.operation_info).metadata_type": "ImportEntriesMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries:import", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "ImportEntriesResponse", - "metadata_type": "ImportEntriesMetadata" - } - } - ] - }, - "SetConfig": { - "requestType": "SetConfigRequest", - "responseType": "MigrationConfig", - "options": { - "(google.api.http).post": "/v1/{name=organizations/*/locations/*}:setConfig", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/{name=projects/*/locations/*}:setConfig", - "(google.api.http).additional_bindings.body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=organizations/*/locations/*}:setConfig", - "body": "*", - "additional_bindings": { - "post": "/v1/{name=projects/*/locations/*}:setConfig", - "body": "*" - } - } - } - ] - }, - "RetrieveConfig": { - "requestType": "RetrieveConfigRequest", - "responseType": "OrganizationConfig", - "options": { - "(google.api.http).get": "/v1/{name=organizations/*/locations/*}:retrieveConfig" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=organizations/*/locations/*}:retrieveConfig" - } - } - ] - }, - "RetrieveEffectiveConfig": { - "requestType": "RetrieveEffectiveConfigRequest", - "responseType": "MigrationConfig", - "options": { - "(google.api.http).get": "/v1/{name=organizations/*/locations/*}:retrieveEffectiveConfig", - "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*}:retrieveEffectiveConfig" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=organizations/*/locations/*}:retrieveEffectiveConfig", - "additional_bindings": { - "get": "/v1/{name=projects/*/locations/*}:retrieveEffectiveConfig" - } - } - } - ] - } - } - }, - "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 - }, - "adminSearch": { - "type": "bool", - "id": 17, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "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 - }, - "totalSize": { - "type": "int32", - "id": 2 - }, - "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 - }, - "project": { - "type": "string", - "id": 6 - }, - "location": { - "type": "string", - "id": 7 - } - } - }, - "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" - ] - }, - "systemSpec": { - "oneof": [ - "sqlDatabaseSystemSpec", - "lookerSystemSpec", - "cloudBigtableSystemSpec" - ] - }, - "typeSpec": { - "oneof": [ - "gcsFilesetSpec", - "bigqueryTableSpec", - "bigqueryDateShardedSpec" - ] - }, - "spec": { - "oneof": [ - "databaseTableSpec", - "dataSourceConnectionSpec", - "routineSpec", - "datasetSpec", - "filesetSpec", - "serviceSpec", - "modelSpec", - "featureOnlineStoreSpec" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER", - "(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 - }, - "sqlDatabaseSystemSpec": { - "type": "SqlDatabaseSystemSpec", - "id": 39 - }, - "lookerSystemSpec": { - "type": "LookerSystemSpec", - "id": 40 - }, - "cloudBigtableSystemSpec": { - "type": "CloudBigtableSystemSpec", - "id": 41 - }, - "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 - }, - "datasetSpec": { - "type": "DatasetSpec", - "id": 32 - }, - "filesetSpec": { - "type": "FilesetSpec", - "id": 33 - }, - "serviceSpec": { - "type": "ServiceSpec", - "id": 42 - }, - "modelSpec": { - "type": "ModelSpec", - "id": 43 - }, - "featureOnlineStoreSpec": { - "type": "FeatureOnlineStoreSpec", - "id": 45 - }, - "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" - } - }, - "databaseViewSpec": { - "type": "DatabaseViewSpec", - "id": 3 - } - }, - "nested": { - "TableType": { - "values": { - "TABLE_TYPE_UNSPECIFIED": 0, - "NATIVE": 1, - "EXTERNAL": 2 - } - }, - "DatabaseViewSpec": { - "oneofs": { - "sourceDefinition": { - "oneof": [ - "baseTable", - "sqlQuery" - ] - } - }, - "fields": { - "viewType": { - "type": "ViewType", - "id": 1 - }, - "baseTable": { - "type": "string", - "id": 2 - }, - "sqlQuery": { - "type": "string", - "id": 3 - } - }, - "nested": { - "ViewType": { - "values": { - "VIEW_TYPE_UNSPECIFIED": 0, - "STANDARD_VIEW": 1, - "MATERIALIZED_VIEW": 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 - } - } - } - } - } - }, - "DatasetSpec": { - "oneofs": { - "systemSpec": { - "oneof": [ - "vertexDatasetSpec" - ] - } - }, - "fields": { - "vertexDatasetSpec": { - "type": "VertexDatasetSpec", - "id": 2 - } - } - }, - "SqlDatabaseSystemSpec": { - "fields": { - "sqlEngine": { - "type": "string", - "id": 1 - }, - "databaseVersion": { - "type": "string", - "id": 2 - }, - "instanceHost": { - "type": "string", - "id": 3 - } - } - }, - "LookerSystemSpec": { - "fields": { - "parentInstanceId": { - "type": "string", - "id": 1 - }, - "parentInstanceDisplayName": { - "type": "string", - "id": 2 - }, - "parentModelId": { - "type": "string", - "id": 3 - }, - "parentModelDisplayName": { - "type": "string", - "id": 4 - }, - "parentViewId": { - "type": "string", - "id": 5 - }, - "parentViewDisplayName": { - "type": "string", - "id": 6 - } - } - }, - "CloudBigtableSystemSpec": { - "fields": { - "instanceDisplayName": { - "type": "string", - "id": 1 - } - } - }, - "CloudBigtableInstanceSpec": { - "fields": { - "cloudBigtableClusterSpecs": { - "rule": "repeated", - "type": "CloudBigtableClusterSpec", - "id": 1 - } - }, - "nested": { - "CloudBigtableClusterSpec": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "location": { - "type": "string", - "id": 2 - }, - "type": { - "type": "string", - "id": 3 - }, - "linkedResource": { - "type": "string", - "id": 4 - } - } - } - } - }, - "ServiceSpec": { - "oneofs": { - "systemSpec": { - "oneof": [ - "cloudBigtableInstanceSpec" - ] - } - }, - "fields": { - "cloudBigtableInstanceSpec": { - "type": "CloudBigtableInstanceSpec", - "id": 1 - } - } - }, - "VertexModelSourceInfo": { - "fields": { - "sourceType": { - "type": "ModelSourceType", - "id": 1 - }, - "copy": { - "type": "bool", - "id": 2 - } - }, - "nested": { - "ModelSourceType": { - "values": { - "MODEL_SOURCE_TYPE_UNSPECIFIED": 0, - "AUTOML": 1, - "CUSTOM": 2, - "BQML": 3, - "MODEL_GARDEN": 4, - "GENIE": 5, - "CUSTOM_TEXT_EMBEDDING": 6, - "MARKETPLACE": 7 - } - } - } - }, - "VertexModelSpec": { - "fields": { - "versionId": { - "type": "string", - "id": 1 - }, - "versionAliases": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "versionDescription": { - "type": "string", - "id": 3 - }, - "vertexModelSourceInfo": { - "type": "VertexModelSourceInfo", - "id": 4 - }, - "containerImageUri": { - "type": "string", - "id": 5 - } - } - }, - "VertexDatasetSpec": { - "fields": { - "dataItemCount": { - "type": "int64", - "id": 1 - }, - "dataType": { - "type": "DataType", - "id": 2 - } - }, - "nested": { - "DataType": { - "values": { - "DATA_TYPE_UNSPECIFIED": 0, - "TABLE": 1, - "IMAGE": 2, - "TEXT": 3, - "VIDEO": 4, - "CONVERSATION": 5, - "TIME_SERIES": 6, - "DOCUMENT": 7, - "TEXT_TO_SPEECH": 8, - "TRANSLATION": 9, - "STORE_VISION": 10, - "ENTERPRISE_KNOWLEDGE_GRAPH": 11, - "TEXT_PROMPT": 12 - } - } - } - }, - "ModelSpec": { - "oneofs": { - "systemSpec": { - "oneof": [ - "vertexModelSpec" - ] - } - }, - "fields": { - "vertexModelSpec": { - "type": "VertexModelSpec", - "id": 1 - } - } - }, - "FeatureOnlineStoreSpec": { - "fields": { - "storageType": { - "type": "StorageType", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "StorageType": { - "values": { - "STORAGE_TYPE_UNSPECIFIED": 0, - "BIGTABLE": 1, - "OPTIMIZED": 2 - } - } - } - }, - "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, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "displayName": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - }, - "dataCatalogTimestamps": { - "type": "SystemTimestamps", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "transferredToDataplex": { - "type": "bool", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "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 - } - } - }, - "ReconcileTagsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/Entry" - } - }, - "tagTemplate": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/TagTemplate" - } - }, - "forceDeleteMissing": { - "type": "bool", - "id": 3 - }, - "tags": { - "rule": "repeated", - "type": "Tag", - "id": 4 - } - } - }, - "ReconcileTagsResponse": { - "fields": { - "createdTagsCount": { - "type": "int64", - "id": 1 - }, - "updatedTagsCount": { - "type": "int64", - "id": 2 - }, - "deletedTagsCount": { - "type": "int64", - "id": 3 - } - } - }, - "ReconcileTagsMetadata": { - "fields": { - "state": { - "type": "ReconciliationState", - "id": 1 - }, - "errors": { - "keyType": "string", - "type": "google.rpc.Status", - "id": 2 - } - }, - "nested": { - "ReconciliationState": { - "values": { - "RECONCILIATION_STATE_UNSPECIFIED": 0, - "RECONCILIATION_QUEUED": 1, - "RECONCILIATION_IN_PROGRESS": 2, - "RECONCILIATION_DONE": 3 - } - } - } - }, - "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": {} - }, - "ImportEntriesRequest": { - "oneofs": { - "source": { - "oneof": [ - "gcsBucketPath" - ] - } - }, - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/Entry" - } - }, - "gcsBucketPath": { - "type": "string", - "id": 2 - }, - "jobId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ImportEntriesResponse": { - "oneofs": { - "_upsertedEntriesCount": { - "oneof": [ - "upsertedEntriesCount" - ] - }, - "_deletedEntriesCount": { - "oneof": [ - "deletedEntriesCount" - ] - } - }, - "fields": { - "upsertedEntriesCount": { - "type": "int64", - "id": 5, - "options": { - "proto3_optional": true - } - }, - "deletedEntriesCount": { - "type": "int64", - "id": 6, - "options": { - "proto3_optional": true - } - } - } - }, - "ImportEntriesMetadata": { - "fields": { - "state": { - "type": "ImportState", - "id": 1 - }, - "errors": { - "rule": "repeated", - "type": "google.rpc.Status", - "id": 2 - } - }, - "nested": { - "ImportState": { - "values": { - "IMPORT_STATE_UNSPECIFIED": 0, - "IMPORT_QUEUED": 1, - "IMPORT_IN_PROGRESS": 2, - "IMPORT_DONE": 3, - "IMPORT_OBSOLETE": 4 - } - } - } - }, - "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, - "DATABASE_SCHEMA": 15, - "DASHBOARD": 16, - "EXPLORE": 17, - "LOOK": 18, - "FEATURE_ONLINE_STORE": 19, - "FEATURE_VIEW": 20, - "FEATURE_GROUP": 21 - } - }, - "SetConfigRequest": { - "oneofs": { - "configuration": { - "oneof": [ - "tagTemplateMigration", - "catalogUiExperience" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "tagTemplateMigration": { - "type": "TagTemplateMigration", - "id": 2 - }, - "catalogUiExperience": { - "type": "CatalogUIExperience", - "id": 3 - } - } - }, - "RetrieveConfigRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "RetrieveEffectiveConfigRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "TagTemplateMigration": { - "values": { - "TAG_TEMPLATE_MIGRATION_UNSPECIFIED": 0, - "TAG_TEMPLATE_MIGRATION_ENABLED": 1, - "TAG_TEMPLATE_MIGRATION_DISABLED": 2 - } - }, - "CatalogUIExperience": { - "values": { - "CATALOG_UI_EXPERIENCE_UNSPECIFIED": 0, - "CATALOG_UI_EXPERIENCE_ENABLED": 1, - "CATALOG_UI_EXPERIENCE_DISABLED": 2 - } - }, - "OrganizationConfig": { - "fields": { - "config": { - "keyType": "string", - "type": "MigrationConfig", - "id": 1 - } - } - }, - "MigrationConfig": { - "fields": { - "tagTemplateMigration": { - "type": "TagTemplateMigration", - "id": 1 - }, - "catalogUiExperience": { - "type": "CatalogUIExperience", - "id": 2 - } - } - }, - "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": { - "oneofs": { - "systemSpec": { - "oneof": [ - "lookerColumnSpec" - ] - } - }, - "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" - } - }, - "defaultValue": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "ordinalPosition": { - "type": "int32", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "highestIndexingType": { - "type": "IndexingType", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "subcolumns": { - "rule": "repeated", - "type": "ColumnSchema", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "lookerColumnSpec": { - "type": "LookerColumnSpec", - "id": 18 - }, - "rangeElementType": { - "type": "FieldElementType", - "id": 19, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "gcRule": { - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "IndexingType": { - "values": { - "INDEXING_TYPE_UNSPECIFIED": 0, - "INDEXING_TYPE_NONE": 1, - "INDEXING_TYPE_NON_UNIQUE": 2, - "INDEXING_TYPE_UNIQUE": 3, - "INDEXING_TYPE_PRIMARY_KEY": 4 - } - }, - "LookerColumnSpec": { - "fields": { - "type": { - "type": "LookerColumnType", - "id": 1 - } - }, - "nested": { - "LookerColumnType": { - "values": { - "LOOKER_COLUMN_TYPE_UNSPECIFIED": 0, - "DIMENSION": 1, - "DIMENSION_GROUP": 2, - "FILTER": 3, - "MEASURE": 4, - "PARAMETER": 5 - } - } - } - }, - "FieldElementType": { - "fields": { - "type": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - } - } - }, - "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, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "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" - } - }, - "dataplexTransferStatus": { - "type": "TagTemplate.DataplexTransferStatus", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "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, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "displayName": { - "type": "string", - "id": 2 - }, - "isPubliclyReadable": { - "type": "bool", - "id": 5 - }, - "fields": { - "keyType": "string", - "type": "TagTemplateField", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "dataplexTransferStatus": { - "type": "DataplexTransferStatus", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "DataplexTransferStatus": { - "valuesOptions": { - "MIGRATED": { - "deprecated": true - } - }, - "values": { - "DATAPLEX_TRANSFER_STATUS_UNSPECIFIED": 0, - "MIGRATED": 1, - "TRANSFERRED": 2 - } - } - } - }, - "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)": "IDENTIFIER" - } - }, - "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 - } - } - }, - "CommonUsageStats": { - "oneofs": { - "_viewCount": { - "oneof": [ - "viewCount" - ] - } - }, - "fields": { - "viewCount": { - "type": "int64", - "id": 1, - "options": { - "proto3_optional": true - } - } - } - }, - "UsageSignal": { - "oneofs": { - "_favoriteCount": { - "oneof": [ - "favoriteCount" - ] - } - }, - "fields": { - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 1 - }, - "usageWithinTimeRange": { - "keyType": "string", - "type": "UsageStats", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "commonUsageWithinTimeRange": { - "keyType": "string", - "type": "CommonUsageStats", - "id": 3 - }, - "favoriteCount": { - "type": "int64", - "id": 4, - "options": { - "proto3_optional": true - } - } - } - }, - "TaggedEntry": { - "oneofs": { - "entry": { - "oneof": [ - "v1Entry" - ] - } - }, - "fields": { - "v1Entry": { - "type": "Entry", - "id": 1 - }, - "presentTags": { - "rule": "repeated", - "type": "Tag", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "absentTags": { - "rule": "repeated", - "type": "Tag", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DumpItem": { - "oneofs": { - "item": { - "oneof": [ - "taggedEntry" - ] - } - }, - "fields": { - "taggedEntry": { - "type": "TaggedEntry", - "id": 1 - } - } - }, - "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)": "IDENTIFIER" - } - }, - "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" - } - }, - "service": { - "type": "Service", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "PolicyType": { - "values": { - "POLICY_TYPE_UNSPECIFIED": 0, - "FINE_GRAINED_ACCESS_CONTROL": 1 - } - }, - "Service": { - "fields": { - "name": { - "type": "ManagingSystem", - "id": 1 - }, - "identity": { - "type": "string", - "id": 2 - } - } - } - } - }, - "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)": "IDENTIFIER" - } - }, - "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 - }, - "filter": { - "type": "string", - "id": 4 - } - } - }, - "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 - } - } - } - } - } - } - } - } - }, - "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", - "options": { - "packed": false - } - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7, - "IDENTIFIER": 8 - } - }, - "http": { - "type": "HttpRule", - "id": 72295728, - "extend": "google.protobuf.MethodOptions" - }, - "Http": { - "fields": { - "rules": { - "rule": "repeated", - "type": "HttpRule", - "id": 1 - }, - "fullyDecodeReservedExpansion": { - "type": "bool", - "id": 2 - } - } - }, - "HttpRule": { - "oneofs": { - "pattern": { - "oneof": [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "get": { - "type": "string", - "id": 2 - }, - "put": { - "type": "string", - "id": 3 - }, - "post": { - "type": "string", - "id": 4 - }, - "delete": { - "type": "string", - "id": 5 - }, - "patch": { - "type": "string", - "id": 6 - }, - "custom": { - "type": "CustomHttpPattern", - "id": 8 - }, - "body": { - "type": "string", - "id": 7 - }, - "responseBody": { - "type": "string", - "id": 12 - }, - "additionalBindings": { - "rule": "repeated", - "type": "HttpRule", - "id": 11 - } - } - }, - "CustomHttpPattern": { - "fields": { - "kind": { - "type": "string", - "id": 1 - }, - "path": { - "type": "string", - "id": 2 - } - } - }, - "methodSignature": { - "rule": "repeated", - "type": "string", - "id": 1051, - "extend": "google.protobuf.MethodOptions" - }, - "defaultHost": { - "type": "string", - "id": 1049, - "extend": "google.protobuf.ServiceOptions" - }, - "oauthScopes": { - "type": "string", - "id": 1050, - "extend": "google.protobuf.ServiceOptions" - }, - "apiVersion": { - "type": "string", - "id": 525000001, - "extend": "google.protobuf.ServiceOptions" - }, - "CommonLanguageSettings": { - "fields": { - "referenceDocsUri": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "destinations": { - "rule": "repeated", - "type": "ClientLibraryDestination", - "id": 2 - } - } - }, - "ClientLibrarySettings": { - "fields": { - "version": { - "type": "string", - "id": 1 - }, - "launchStage": { - "type": "LaunchStage", - "id": 2 - }, - "restNumericEnums": { - "type": "bool", - "id": 3 - }, - "javaSettings": { - "type": "JavaSettings", - "id": 21 - }, - "cppSettings": { - "type": "CppSettings", - "id": 22 - }, - "phpSettings": { - "type": "PhpSettings", - "id": 23 - }, - "pythonSettings": { - "type": "PythonSettings", - "id": 24 - }, - "nodeSettings": { - "type": "NodeSettings", - "id": 25 - }, - "dotnetSettings": { - "type": "DotnetSettings", - "id": 26 - }, - "rubySettings": { - "type": "RubySettings", - "id": 27 - }, - "goSettings": { - "type": "GoSettings", - "id": 28 - } - } - }, - "Publishing": { - "fields": { - "methodSettings": { - "rule": "repeated", - "type": "MethodSettings", - "id": 2 - }, - "newIssueUri": { - "type": "string", - "id": 101 - }, - "documentationUri": { - "type": "string", - "id": 102 - }, - "apiShortName": { - "type": "string", - "id": 103 - }, - "githubLabel": { - "type": "string", - "id": 104 - }, - "codeownerGithubTeams": { - "rule": "repeated", - "type": "string", - "id": 105 - }, - "docTagPrefix": { - "type": "string", - "id": 106 - }, - "organization": { - "type": "ClientLibraryOrganization", - "id": 107 - }, - "librarySettings": { - "rule": "repeated", - "type": "ClientLibrarySettings", - "id": 109 - }, - "protoReferenceDocumentationUri": { - "type": "string", - "id": 110 - }, - "restReferenceDocumentationUri": { - "type": "string", - "id": 111 - } - } - }, - "JavaSettings": { - "fields": { - "libraryPackage": { - "type": "string", - "id": 1 - }, - "serviceClassNames": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "common": { - "type": "CommonLanguageSettings", - "id": 3 - } - } - }, - "CppSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PhpSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PythonSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "NodeSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "DotnetSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - }, - "renamedServices": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "renamedResources": { - "keyType": "string", - "type": "string", - "id": 3 - }, - "ignoredResources": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "forcedNamespaceAliases": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "handwrittenSignatures": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - }, - "RubySettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "GoSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "MethodSettings": { - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "longRunning": { - "type": "LongRunning", - "id": 2 - }, - "autoPopulatedFields": { - "rule": "repeated", - "type": "string", - "id": 3 - } - }, - "nested": { - "LongRunning": { - "fields": { - "initialPollDelay": { - "type": "google.protobuf.Duration", - "id": 1 - }, - "pollDelayMultiplier": { - "type": "float", - "id": 2 - }, - "maxPollDelay": { - "type": "google.protobuf.Duration", - "id": 3 - }, - "totalPollTimeout": { - "type": "google.protobuf.Duration", - "id": 4 - } - } - } - } - }, - "ClientLibraryOrganization": { - "values": { - "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, - "CLOUD": 1, - "ADS": 2, - "PHOTOS": 3, - "STREET_VIEW": 4, - "SHOPPING": 5, - "GEO": 6, - "GENERATIVE_AI": 7 - } - }, - "ClientLibraryDestination": { - "values": { - "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, - "GITHUB": 10, - "PACKAGE_MANAGER": 20 - } - }, - "LaunchStage": { - "values": { - "LAUNCH_STAGE_UNSPECIFIED": 0, - "UNIMPLEMENTED": 6, - "PRELAUNCH": 7, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5 - } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - }, - "style": { - "rule": "repeated", - "type": "Style", - "id": 10 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - }, - "Style": { - "values": { - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } - } - } - }, - "protobuf": { - "options": { - "go_package": "google.golang.org/protobuf/types/descriptorpb", - "java_package": "com.google.protobuf", - "java_outer_classname": "DescriptorProtos", - "csharp_namespace": "Google.Protobuf.Reflection", - "objc_class_prefix": "GPB", - "cc_enable_arenas": true, - "optimize_for": "SPEED" - }, - "nested": { - "FileDescriptorSet": { - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - } - }, - "Edition": { - "values": { - "EDITION_UNKNOWN": 0, - "EDITION_PROTO2": 998, - "EDITION_PROTO3": 999, - "EDITION_2023": 1000, - "EDITION_2024": 1001, - "EDITION_1_TEST_ONLY": 1, - "EDITION_2_TEST_ONLY": 2, - "EDITION_99997_TEST_ONLY": 99997, - "EDITION_99998_TEST_ONLY": 99998, - "EDITION_99999_TEST_ONLY": 99999, - "EDITION_MAX": 2147483647 - } - }, - "FileDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "package": { - "type": "string", - "id": 2 - }, - "dependency": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "publicDependency": { - "rule": "repeated", - "type": "int32", - "id": 10, - "options": { - "packed": false - } - }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11, - "options": { - "packed": false - } - }, - "messageType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 4 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 5 - }, - "service": { - "rule": "repeated", - "type": "ServiceDescriptorProto", - "id": 6 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 7 - }, - "options": { - "type": "FileOptions", - "id": 8 - }, - "sourceCodeInfo": { - "type": "SourceCodeInfo", - "id": 9 - }, - "syntax": { - "type": "string", - "id": 12 - }, - "edition": { - "type": "Edition", - "id": 14 - } - } - }, - "DescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "field": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 2 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 6 - }, - "nestedType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 3 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 4 - }, - "extensionRange": { - "rule": "repeated", - "type": "ExtensionRange", - "id": 5 - }, - "oneofDecl": { - "rule": "repeated", - "type": "OneofDescriptorProto", - "id": 8 - }, - "options": { - "type": "MessageOptions", - "id": 7 - }, - "reservedRange": { - "rule": "repeated", - "type": "ReservedRange", - "id": 9 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 10 - } - }, - "nested": { - "ExtensionRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "ExtensionRangeOptions", - "id": 3 - } - } - }, - "ReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "ExtensionRangeOptions": { - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - }, - "declaration": { - "rule": "repeated", - "type": "Declaration", - "id": 2, - "options": { - "retention": "RETENTION_SOURCE" - } - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "verification": { - "type": "VerificationState", - "id": 3, - "options": { - "default": "UNVERIFIED", - "retention": "RETENTION_SOURCE" - } - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "Declaration": { - "fields": { - "number": { - "type": "int32", - "id": 1 - }, - "fullName": { - "type": "string", - "id": 2 - }, - "type": { - "type": "string", - "id": 3 - }, - "reserved": { - "type": "bool", - "id": 5 - }, - "repeated": { - "type": "bool", - "id": 6 - } - }, - "reserved": [ - [ - 4, - 4 - ] - ] - }, - "VerificationState": { - "values": { - "DECLARATION": 0, - "UNVERIFIED": 1 - } - } - } - }, - "FieldDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 3 - }, - "label": { - "type": "Label", - "id": 4 - }, - "type": { - "type": "Type", - "id": 5 - }, - "typeName": { - "type": "string", - "id": 6 - }, - "extendee": { - "type": "string", - "id": 2 - }, - "defaultValue": { - "type": "string", - "id": 7 - }, - "oneofIndex": { - "type": "int32", - "id": 9 - }, - "jsonName": { - "type": "string", - "id": 10 - }, - "options": { - "type": "FieldOptions", - "id": 8 - }, - "proto3Optional": { - "type": "bool", - "id": 17 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18 - } - }, - "Label": { - "values": { - "LABEL_OPTIONAL": 1, - "LABEL_REPEATED": 3, - "LABEL_REQUIRED": 2 - } - } - } - }, - "OneofDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "value": { - "rule": "repeated", - "type": "EnumValueDescriptorProto", - "id": 2 - }, - "options": { - "type": "EnumOptions", - "id": 3 - }, - "reservedRange": { - "rule": "repeated", - "type": "EnumReservedRange", - "id": 4 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "EnumReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "EnumValueDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 - }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - } - }, - "MethodDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "inputType": { - "type": "string", - "id": 2 - }, - "outputType": { - "type": "string", - "id": 3 - }, - "options": { - "type": "MethodOptions", - "id": 4 - }, - "clientStreaming": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "serverStreaming": { - "type": "bool", - "id": 6, - "options": { - "default": false - } - } - } - }, - "FileOptions": { - "fields": { - "javaPackage": { - "type": "string", - "id": 1 - }, - "javaOuterClassname": { - "type": "string", - "id": 8 - }, - "javaMultipleFiles": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "javaGenerateEqualsAndHash": { - "type": "bool", - "id": 20, - "options": { - "deprecated": true - } - }, - "javaStringCheckUtf8": { - "type": "bool", - "id": 27, - "options": { - "default": false - } - }, - "optimizeFor": { - "type": "OptimizeMode", - "id": 9, - "options": { - "default": "SPEED" - } - }, - "goPackage": { - "type": "string", - "id": 11 - }, - "ccGenericServices": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "javaGenericServices": { - "type": "bool", - "id": 17, - "options": { - "default": false - } - }, - "pyGenericServices": { - "type": "bool", - "id": 18, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 23, - "options": { - "default": false - } - }, - "ccEnableArenas": { - "type": "bool", - "id": 31, - "options": { - "default": true - } - }, - "objcClassPrefix": { - "type": "string", - "id": 36 - }, - "csharpNamespace": { - "type": "string", - "id": 37 - }, - "swiftPrefix": { - "type": "string", - "id": 39 - }, - "phpClassPrefix": { - "type": "string", - "id": 40 - }, - "phpNamespace": { - "type": "string", - "id": 41 - }, - "phpMetadataNamespace": { - "type": "string", - "id": 44 - }, - "rubyPackage": { - "type": "string", - "id": 45 - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 42, - 42 - ], - [ - 38, - 38 - ] - ], - "nested": { - "OptimizeMode": { - "values": { - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3 - } - } - } - }, - "MessageOptions": { - "fields": { - "messageSetWireFormat": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "noStandardDescriptorAccessor": { - "type": "bool", - "id": 2, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "mapEntry": { - "type": "bool", - "id": 7 - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 11, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 12 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 5, - 5 - ], - [ - 6, - 6 - ], - [ - 8, - 8 - ], - [ - 9, - 9 - ] - ] - }, - "FieldOptions": { - "fields": { - "ctype": { - "type": "CType", - "id": 1, - "options": { - "default": "STRING" - } - }, - "packed": { - "type": "bool", - "id": 2 - }, - "jstype": { - "type": "JSType", - "id": 6, - "options": { - "default": "JS_NORMAL" - } - }, - "lazy": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "unverifiedLazy": { - "type": "bool", - "id": 15, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "weak": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "debugRedact": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "retention": { - "type": "OptionRetention", - "id": 17 - }, - "targets": { - "rule": "repeated", - "type": "OptionTargetType", - "id": 19, - "options": { - "packed": false - } - }, - "editionDefaults": { - "rule": "repeated", - "type": "EditionDefault", - "id": 20 - }, - "features": { - "type": "FeatureSet", - "id": 21 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 18, - 18 - ] - ], - "nested": { - "CType": { - "values": { - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2 - } - }, - "JSType": { - "values": { - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2 - } - }, - "OptionRetention": { - "values": { - "RETENTION_UNKNOWN": 0, - "RETENTION_RUNTIME": 1, - "RETENTION_SOURCE": 2 - } - }, - "OptionTargetType": { - "values": { - "TARGET_TYPE_UNKNOWN": 0, - "TARGET_TYPE_FILE": 1, - "TARGET_TYPE_EXTENSION_RANGE": 2, - "TARGET_TYPE_MESSAGE": 3, - "TARGET_TYPE_FIELD": 4, - "TARGET_TYPE_ONEOF": 5, - "TARGET_TYPE_ENUM": 6, - "TARGET_TYPE_ENUM_ENTRY": 7, - "TARGET_TYPE_SERVICE": 8, - "TARGET_TYPE_METHOD": 9 - } - }, - "EditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "value": { - "type": "string", - "id": 2 - } - } - } - } - }, - "OneofOptions": { - "fields": { - "features": { - "type": "FeatureSet", - "id": 1 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "EnumOptions": { - "fields": { - "allowAlias": { - "type": "bool", - "id": 2 - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 6, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 7 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 5, - 5 - ] - ] - }, - "EnumValueOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "features": { - "type": "FeatureSet", - "id": 2 - }, - "debugRedact": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "ServiceOptions": { - "fields": { - "features": { - "type": "FeatureSet", - "id": 34 - }, - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "MethodOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "idempotencyLevel": { - "type": "IdempotencyLevel", - "id": 34, - "options": { - "default": "IDEMPOTENCY_UNKNOWN" - } - }, - "features": { - "type": "FeatureSet", - "id": 35 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "IdempotencyLevel": { - "values": { - "IDEMPOTENCY_UNKNOWN": 0, - "NO_SIDE_EFFECTS": 1, - "IDEMPOTENT": 2 - } - } - } - }, - "UninterpretedOption": { - "fields": { - "name": { - "rule": "repeated", - "type": "NamePart", - "id": 2 - }, - "identifierValue": { - "type": "string", - "id": 3 - }, - "positiveIntValue": { - "type": "uint64", - "id": 4 - }, - "negativeIntValue": { - "type": "int64", - "id": 5 - }, - "doubleValue": { - "type": "double", - "id": 6 - }, - "stringValue": { - "type": "bytes", - "id": 7 - }, - "aggregateValue": { - "type": "string", - "id": 8 - } - }, - "nested": { - "NamePart": { - "fields": { - "namePart": { - "rule": "required", - "type": "string", - "id": 1 - }, - "isExtension": { - "rule": "required", - "type": "bool", - "id": 2 - } - } - } - } - }, - "FeatureSet": { - "fields": { - "fieldPresence": { - "type": "FieldPresence", - "id": 1, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_2023", - "edition_defaults.value": "EXPLICIT" - } - }, - "enumType": { - "type": "EnumType", - "id": 2, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "OPEN" - } - }, - "repeatedFieldEncoding": { - "type": "RepeatedFieldEncoding", - "id": 3, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "PACKED" - } - }, - "utf8Validation": { - "type": "Utf8Validation", - "id": 4, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "VERIFY" - } - }, - "messageEncoding": { - "type": "MessageEncoding", - "id": 5, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", - "edition_defaults.value": "LENGTH_PREFIXED" - } - }, - "jsonFormat": { - "type": "JsonFormat", - "id": 6, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "ALLOW" - } - } - }, - "extensions": [ - [ - 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 - ], - [ - 9995, - 9999 - ], - [ - 10000, - 10000 - ] - ], - "reserved": [ - [ - 999, - 999 - ] - ], - "nested": { - "FieldPresence": { - "values": { - "FIELD_PRESENCE_UNKNOWN": 0, - "EXPLICIT": 1, - "IMPLICIT": 2, - "LEGACY_REQUIRED": 3 - } - }, - "EnumType": { - "values": { - "ENUM_TYPE_UNKNOWN": 0, - "OPEN": 1, - "CLOSED": 2 - } - }, - "RepeatedFieldEncoding": { - "values": { - "REPEATED_FIELD_ENCODING_UNKNOWN": 0, - "PACKED": 1, - "EXPANDED": 2 - } - }, - "Utf8Validation": { - "values": { - "UTF8_VALIDATION_UNKNOWN": 0, - "VERIFY": 2, - "NONE": 3 - } - }, - "MessageEncoding": { - "values": { - "MESSAGE_ENCODING_UNKNOWN": 0, - "LENGTH_PREFIXED": 1, - "DELIMITED": 2 - } - }, - "JsonFormat": { - "values": { - "JSON_FORMAT_UNKNOWN": 0, - "ALLOW": 1, - "LEGACY_BEST_EFFORT": 2 - } - } - } - }, - "FeatureSetDefaults": { - "fields": { - "defaults": { - "rule": "repeated", - "type": "FeatureSetEditionDefault", - "id": 1 - }, - "minimumEdition": { - "type": "Edition", - "id": 4 - }, - "maximumEdition": { - "type": "Edition", - "id": 5 - } - }, - "nested": { - "FeatureSetEditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "features": { - "type": "FeatureSet", - "id": 2 - } - } - } - } - }, - "SourceCodeInfo": { - "fields": { - "location": { - "rule": "repeated", - "type": "Location", - "id": 1 - } - }, - "nested": { - "Location": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "span": { - "rule": "repeated", - "type": "int32", - "id": 2 - }, - "leadingComments": { - "type": "string", - "id": 3 - }, - "trailingComments": { - "type": "string", - "id": 4 - }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - } - } - }, - "GeneratedCodeInfo": { - "fields": { - "annotation": { - "rule": "repeated", - "type": "Annotation", - "id": 1 - } - }, - "nested": { - "Annotation": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "sourceFile": { - "type": "string", - "id": 2 - }, - "begin": { - "type": "int32", - "id": 3 - }, - "end": { - "type": "int32", - "id": 4 - }, - "semantic": { - "type": "Semantic", - "id": 5 - } - }, - "nested": { - "Semantic": { - "values": { - "NONE": 0, - "SET": 1, - "ALIAS": 2 - } - } - } - } - } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "Any": { - "fields": { - "type_url": { - "type": "string", - "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 - } - } - }, - "Empty": { - "fields": {} - } - } - }, - "iam": { - "nested": { - "v1": { - "options": { - "cc_enable_arenas": true, - "csharp_namespace": "Google.Cloud.Iam.V1", - "go_package": "cloud.google.com/go/iam/apiv1/iampb;iampb", - "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 - } - } - } - } - }, - "longrunning": { - "options": { - "cc_enable_arenas": true, - "csharp_namespace": "Google.LongRunning", - "go_package": "cloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb", - "java_multiple_files": true, - "java_outer_classname": "OperationsProto", - "java_package": "com.google.longrunning", - "php_namespace": "Google\\LongRunning" - }, - "nested": { - "operationInfo": { - "type": "google.longrunning.OperationInfo", - "id": 1049, - "extend": "google.protobuf.MethodOptions" - }, - "Operations": { - "options": { - "(google.api.default_host)": "longrunning.googleapis.com" - }, - "methods": { - "ListOperations": { - "requestType": "ListOperationsRequest", - "responseType": "ListOperationsResponse", - "options": { - "(google.api.http).get": "/v1/{name=operations}", - "(google.api.method_signature)": "name,filter" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=operations}" - } - }, - { - "(google.api.method_signature)": "name,filter" - } - ] - }, - "GetOperation": { - "requestType": "GetOperationRequest", - "responseType": "Operation", - "options": { - "(google.api.http).get": "/v1/{name=operations/**}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=operations/**}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "DeleteOperation": { - "requestType": "DeleteOperationRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=operations/**}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=operations/**}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CancelOperation": { - "requestType": "CancelOperationRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).post": "/v1/{name=operations/**}:cancel", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=operations/**}:cancel", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "WaitOperation": { - "requestType": "WaitOperationRequest", - "responseType": "Operation" - } - } - }, - "Operation": { - "oneofs": { - "result": { - "oneof": [ - "error", - "response" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "metadata": { - "type": "google.protobuf.Any", - "id": 2 - }, - "done": { - "type": "bool", - "id": 3 - }, - "error": { - "type": "google.rpc.Status", - "id": 4 - }, - "response": { - "type": "google.protobuf.Any", - "id": 5 - } - } - }, - "GetOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "ListOperationsRequest": { - "fields": { - "name": { - "type": "string", - "id": 4 - }, - "filter": { - "type": "string", - "id": 1 - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListOperationsResponse": { - "fields": { - "operations": { - "rule": "repeated", - "type": "Operation", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "CancelOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "DeleteOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "WaitOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "timeout": { - "type": "google.protobuf.Duration", - "id": 2 - } - } - }, - "OperationInfo": { - "fields": { - "responseType": { - "type": "string", - "id": 1 - }, - "metadataType": { - "type": "string", - "id": 2 - } - } - } - } - }, - "rpc": { - "options": { - "cc_enable_arenas": true, - "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", - "java_multiple_files": true, - "java_outer_classname": "StatusProto", - "java_package": "com.google.rpc", - "objc_class_prefix": "RPC" - }, - "nested": { - "Status": { - "fields": { - "code": { - "type": "int32", - "id": 1 - }, - "message": { - "type": "string", - "id": 2 - }, - "details": { - "rule": "repeated", - "type": "google.protobuf.Any", - "id": 3 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_entry.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_entry.js deleted file mode 100644 index 4dec286ef3d..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_entry.js +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_entry_group.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_entry_group.js deleted file mode 100644 index b1909bf3acc..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_entry_group.js +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_tag.js deleted file mode 100644 index dda7adab166..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_tag.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_tag_template.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_tag_template.js deleted file mode 100644 index d1750ae9608..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_tag_template.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_tag_template_field.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_tag_template_field.js deleted file mode 100644 index c4b8a1568c5..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.create_tag_template_field.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_entry.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_entry.js deleted file mode 100644 index 3e6123e8d84..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_entry.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_entry_group.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_entry_group.js deleted file mode 100644 index 6cedee23bf1..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_entry_group.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_tag.js deleted file mode 100644 index f600946c02d..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_tag.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_tag_template.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_tag_template.js deleted file mode 100644 index e581d2690f5..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_tag_template.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_tag_template_field.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_tag_template_field.js deleted file mode 100644 index 93c07061724..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.delete_tag_template_field.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_entry.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_entry.js deleted file mode 100644 index 2e796a4120a..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_entry.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_entry_group.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_entry_group.js deleted file mode 100644 index 464ac1b5d01..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_entry_group.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_iam_policy.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_iam_policy.js deleted file mode 100644 index d22ebd2d441..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_iam_policy.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_tag_template.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_tag_template.js deleted file mode 100644 index 9f02313f823..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.get_tag_template.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.import_entries.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.import_entries.js deleted file mode 100644 index cd37504e57e..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.import_entries.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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_ImportEntries_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Target entry group for ingested entries. - */ - // const parent = 'abc123' - /** - * Path to a Cloud Storage bucket that contains a dump ready for ingestion. - */ - // const gcsBucketPath = 'abc123' - /** - * Optional. (Optional) Dataplex task job id, if specified will be used as - * part of ImportEntries LRO ID - */ - // const jobId = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callImportEntries() { - // Construct request - const request = { - parent, - }; - - // Run request - const [operation] = await datacatalogClient.importEntries(request); - const [response] = await operation.promise(); - console.log(response); - } - - callImportEntries(); - // [END datacatalog_v1_generated_DataCatalog_ImportEntries_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.list_entries.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.list_entries.js deleted file mode 100644 index 6c448c00a31..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.list_entries.js +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 = 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.list_entry_groups.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.list_entry_groups.js deleted file mode 100644 index aef01a89525..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.list_entry_groups.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 = 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.list_tags.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.list_tags.js deleted file mode 100644 index d2a6dae4fb6..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.list_tags.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 = 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.lookup_entry.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.lookup_entry.js deleted file mode 100644 index 9223e4dd7e8..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.lookup_entry.js +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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) (https://cloud.google.com//data-catalog/docs/fully-qualified-names) - * 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' - /** - * Project where the lookup should be performed. Required to lookup - * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` - * using its `fully_qualified_name`. Ignored in other cases. - */ - // const project = 'my-project' - /** - * Location where the lookup should be performed. Required to lookup - * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` - * using its `fully_qualified_name`. Ignored in other cases. - */ - // const location = '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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.modify_entry_contacts.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.modify_entry_contacts.js deleted file mode 100644 index 6e231d42ebb..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.modify_entry_contacts.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.modify_entry_overview.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.modify_entry_overview.js deleted file mode 100644 index d3f6bbe8032..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.modify_entry_overview.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.reconcile_tags.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.reconcile_tags.js deleted file mode 100644 index eafaca6a135..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.reconcile_tags.js +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, tagTemplate) { - // [START datacatalog_v1_generated_DataCatalog_ReconcileTags_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Name of Entry google.cloud.datacatalog.v1.Entry to be tagged. - */ - // const parent = 'abc123' - /** - * Required. The name of the tag template, which is used for reconciliation. - */ - // const tagTemplate = 'abc123' - /** - * If set to `true`, deletes entry tags related to a tag template - * not listed in the tags source from an entry. If set to `false`, - * unlisted tags are retained. - */ - // const forceDeleteMissing = true - /** - * A list of tags to apply to an entry. A tag can specify a - * tag template, which must be the template specified in the - * `ReconcileTagsRequest`. - * The sole entry and each of its columns must be mentioned at most once. - */ - // const tags = [1,2,3,4] - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callReconcileTags() { - // Construct request - const request = { - parent, - tagTemplate, - }; - - // Run request - const [operation] = await datacatalogClient.reconcileTags(request); - const [response] = await operation.promise(); - console.log(response); - } - - callReconcileTags(); - // [END datacatalog_v1_generated_DataCatalog_ReconcileTags_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.rename_tag_template_field.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.rename_tag_template_field.js deleted file mode 100644 index 5ee973520ab..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.rename_tag_template_field.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.rename_tag_template_field_enum_value.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.rename_tag_template_field_enum_value.js deleted file mode 100644 index bd10fb422f9..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.rename_tag_template_field_enum_value.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.retrieve_config.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.retrieve_config.js deleted file mode 100644 index 8e1535ef179..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.retrieve_config.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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_RetrieveConfig_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will 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 organization whose config is being retrieved. - */ - // const name = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callRetrieveConfig() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datacatalogClient.retrieveConfig(request); - console.log(response); - } - - callRetrieveConfig(); - // [END datacatalog_v1_generated_DataCatalog_RetrieveConfig_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.retrieve_effective_config.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.retrieve_effective_config.js deleted file mode 100644 index 8481756c5ff..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.retrieve_effective_config.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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_RetrieveEffectiveConfig_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will 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 whose effective config is being retrieved. - */ - // const name = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callRetrieveEffectiveConfig() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datacatalogClient.retrieveEffectiveConfig(request); - console.log(response); - } - - callRetrieveEffectiveConfig(); - // [END datacatalog_v1_generated_DataCatalog_RetrieveEffectiveConfig_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.search_catalog.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.search_catalog.js deleted file mode 100644 index 5cec31e396e..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.search_catalog.js +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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' - /** - * Upper bound on the number of results you can get in a single response. - * 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 - * 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. - * If you are experiencing recall issues and you don't have to fetch the - * results in any specific order, consider setting this parameter to - * `default`. - * If this parameter is omitted, it defaults to the descending `relevance`. - */ - // const orderBy = 'abc123' - /** - * Optional. If set, use searchAll permission granted on organizations from - * `include_org_ids` and projects from `include_project_ids` instead of the - * fine grained per resource permissions when filtering the search results. - * The only allowed `order_by` criteria for admin_search mode is `default`. - * Using this flags guarantees a full recall of the search results. - */ - // const adminSearch = true - - // 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 = 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.set_config.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.set_config.js deleted file mode 100644 index c7d5d77dc07..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.set_config.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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_SetConfig_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will 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 organization or project whose config is being specified. - */ - // const name = 'abc123' - /** - * Opt-in status for the migration of Tag Templates to Dataplex. - */ - // const tagTemplateMigration = {} - /** - * Opt-in status for the UI switch to Dataplex. - */ - // const catalogUiExperience = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callSetConfig() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datacatalogClient.setConfig(request); - console.log(response); - } - - callSetConfig(); - // [END datacatalog_v1_generated_DataCatalog_SetConfig_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.set_iam_policy.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.set_iam_policy.js deleted file mode 100644 index ecb39caf993..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.set_iam_policy.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.star_entry.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.star_entry.js deleted file mode 100644 index b5a973b7e18..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.star_entry.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.test_iam_permissions.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.test_iam_permissions.js deleted file mode 100644 index c9460c31f5c..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.test_iam_permissions.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 = ['abc','def'] - - // 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.unstar_entry.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.unstar_entry.js deleted file mode 100644 index bd31f3611d9..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.unstar_entry.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_entry.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_entry.js deleted file mode 100644 index 26ad8f60266..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_entry.js +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_entry_group.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_entry_group.js deleted file mode 100644 index 3d8bc9eaa84..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_entry_group.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_tag.js deleted file mode 100644 index a429ca6fe49..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_tag.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_tag_template.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_tag_template.js deleted file mode 100644 index 0b1ccc785d5..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_tag_template.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_tag_template_field.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_tag_template_field.js deleted file mode 100644 index b9e18256601..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/data_catalog.update_tag_template_field.js +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.create_policy_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.create_policy_tag.js deleted file mode 100644 index 7006cd16c8b..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.create_policy_tag.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.create_taxonomy.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.create_taxonomy.js deleted file mode 100644 index 2329f33b645..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.create_taxonomy.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.delete_policy_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.delete_policy_tag.js deleted file mode 100644 index c1b2b208653..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.delete_policy_tag.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.delete_taxonomy.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.delete_taxonomy.js deleted file mode 100644 index 77940dcba83..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.delete_taxonomy.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.get_iam_policy.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.get_iam_policy.js deleted file mode 100644 index 4c270dc80ae..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.get_iam_policy.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.get_policy_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.get_policy_tag.js deleted file mode 100644 index ac6b9d5ef71..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.get_policy_tag.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.get_taxonomy.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.get_taxonomy.js deleted file mode 100644 index 7ff0a3a8f21..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.get_taxonomy.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.list_policy_tags.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.list_policy_tags.js deleted file mode 100644 index 2bf0a7cc4e4..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.list_policy_tags.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 = 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.list_taxonomies.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.list_taxonomies.js deleted file mode 100644 index 4ca5ec8f119..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.list_taxonomies.js +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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' - /** - * Supported field for filter is 'service' and value is 'dataplex'. - * Eg: service=dataplex. - */ - // const filter = '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 = 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.set_iam_policy.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.set_iam_policy.js deleted file mode 100644 index 8599b15230c..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.set_iam_policy.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.test_iam_permissions.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.test_iam_permissions.js deleted file mode 100644 index 742b043644d..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.test_iam_permissions.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 = ['abc','def'] - - // 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.update_policy_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.update_policy_tag.js deleted file mode 100644 index aa10b6bceed..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.update_policy_tag.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.update_taxonomy.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.update_taxonomy.js deleted file mode 100644 index 5c64aa74a0b..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager.update_taxonomy.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager_serialization.export_taxonomies.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager_serialization.export_taxonomies.js deleted file mode 100644 index 146fdfa4543..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager_serialization.export_taxonomies.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 = ['abc','def'] - /** - * 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager_serialization.import_taxonomies.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager_serialization.import_taxonomies.js deleted file mode 100644 index 2811178851c..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager_serialization.import_taxonomies.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager_serialization.replace_taxonomy.js b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager_serialization.replace_taxonomy.js deleted file mode 100644 index 19e3b2566f8..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/policy_tag_manager_serialization.replace_taxonomy.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.v1.json b/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.v1.json deleted file mode 100644 index b896bb69f03..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.v1.json +++ /dev/null @@ -1,2407 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-datacatalog", - "version": "0.1.0", - "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": 110, - "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" - }, - { - "name": "admin_search", - "type": "TYPE_BOOL" - } - ], - "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": 68, - "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": 95, - "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" - }, - { - "name": "project", - "type": "TYPE_STRING" - }, - { - "name": "location", - "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": 59, - "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": 59, - "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_ReconcileTags_async", - "title": "DataCatalog reconcileTags Sample", - "origin": "API_DEFINITION", - "description": " `ReconcileTags` creates or updates a list of tags on the entry. If the [ReconcileTagsRequest.force_delete_missing][google.cloud.datacatalog.v1.ReconcileTagsRequest.force_delete_missing] parameter is set, the operation deletes tags not included in the input tag list. `ReconcileTags` returns a [long-running operation] [google.longrunning.Operation] resource that can be queried with [Operations.GetOperation][google.longrunning.Operations.GetOperation] to return [ReconcileTagsMetadata] [google.cloud.datacatalog.v1.ReconcileTagsMetadata] and a [ReconcileTagsResponse] [google.cloud.datacatalog.v1.ReconcileTagsResponse] message.", - "canonical": true, - "file": "data_catalog.reconcile_tags.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ReconcileTags", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.ReconcileTags", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "tag_template", - "type": "TYPE_STRING" - }, - { - "name": "force_delete_missing", - "type": "TYPE_BOOL" - }, - { - "name": "tags", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "ReconcileTags", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.ReconcileTags", - "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_DataCatalog_ImportEntries_async", - "title": "DataCatalog importEntries Sample", - "origin": "API_DEFINITION", - "description": " Imports entries from a source, such as data previously dumped into a Cloud Storage bucket, into Data Catalog. Import of entries is a sync operation that reconciles the state of the third-party system with the Data Catalog. `ImportEntries` accepts source data snapshots of a third-party system. Snapshot should be delivered as a .wire or base65-encoded .txt file containing a sequence of Protocol Buffer messages of [DumpItem][google.cloud.datacatalog.v1.DumpItem] type. `ImportEntries` returns a [long-running operation] [google.longrunning.Operation] resource that can be queried with [Operations.GetOperation][google.longrunning.Operations.GetOperation] to return [ImportEntriesMetadata][google.cloud.datacatalog.v1.ImportEntriesMetadata] and an [ImportEntriesResponse][google.cloud.datacatalog.v1.ImportEntriesResponse] message.", - "canonical": true, - "file": "data_catalog.import_entries.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ImportEntries", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.ImportEntries", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "gcs_bucket_path", - "type": "TYPE_STRING" - }, - { - "name": "job_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "ImportEntries", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.ImportEntries", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_SetConfig_async", - "title": "DataCatalog setConfig Sample", - "origin": "API_DEFINITION", - "description": " Sets the configuration related to the migration to Dataplex for an organization or project.", - "canonical": true, - "file": "data_catalog.set_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetConfig", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.SetConfig", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "tag_template_migration", - "type": ".google.cloud.datacatalog.v1.TagTemplateMigration" - }, - { - "name": "catalog_ui_experience", - "type": ".google.cloud.datacatalog.v1.CatalogUIExperience" - } - ], - "resultType": ".google.cloud.datacatalog.v1.MigrationConfig", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "SetConfig", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.SetConfig", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_RetrieveConfig_async", - "title": "DataCatalog retrieveConfig Sample", - "origin": "API_DEFINITION", - "description": " Retrieves the configuration related to the migration from Data Catalog to Dataplex for a specific organization, including all the projects under it which have a separate configuration set.", - "canonical": true, - "file": "data_catalog.retrieve_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RetrieveConfig", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.RetrieveConfig", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1.OrganizationConfig", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "RetrieveConfig", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.RetrieveConfig", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_RetrieveEffectiveConfig_async", - "title": "DataCatalog retrieveEffectiveConfig Sample", - "origin": "API_DEFINITION", - "description": " Retrieves the effective configuration related to the migration from Data Catalog to Dataplex for a specific organization or project. If there is no specific configuration set for the resource, the setting is checked hierarchicahlly through the ancestors of the resource, starting from the resource itself.", - "canonical": true, - "file": "data_catalog.retrieve_effective_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RetrieveEffectiveConfig", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.RetrieveEffectiveConfig", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1.MigrationConfig", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "RetrieveEffectiveConfig", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.RetrieveEffectiveConfig", - "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": 71, - "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" - }, - { - "name": "filter", - "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": 62, - "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": 64, - "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" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/src/index.ts b/owl-bot-staging/google-cloud-datacatalog/v1/src/index.ts deleted file mode 100644 index 8c76d4d1e22..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/src/index.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as v1 from './v1'; -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, DataCatalogClient, PolicyTagManagerClient, PolicyTagManagerSerializationClient}; -export default {v1, DataCatalogClient, PolicyTagManagerClient, PolicyTagManagerSerializationClient}; -import * as protos from '../protos/protos'; -export {protos} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/data_catalog_client.ts b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/data_catalog_client.ts deleted file mode 100644 index 6ce4b1e71e9..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/data_catalog_client.ts +++ /dev/null @@ -1,4651 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall} from 'google-gax'; -import {Transform} from 'stream'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); - -/** - * Client JSON configuration object, loaded from - * `src/v1/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}; - private _universeDomain: string; - private _servicePath: string; - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - pathTemplates: {[name: string]: gax.PathTemplate}; - operationsClient: gax.OperationsClient; - 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} [options.fallback] - Use HTTP/1.1 REST mode. - * For more information, please check the - * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you - * need to avoid loading the default gRPC version and want to use the fallback - * HTTP implementation. Load only fallback version and pass it to the constructor: - * ``` - * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC - * const client = new DataCatalogClient({fallback: true}, gax); - * ``` - */ - constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof DataCatalogClient; - if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { - throw new Error('Please set either universe_domain or universeDomain, but not both.'); - } - const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; - this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; - this._servicePath = 'datacatalog.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - 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') - }; - - const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); - // This API contains "long-running operations", which return a - // an Operation object that allows for tracking of the operation, - // rather than holding a request open. - const lroOptions: GrpcClientOptions = { - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined - }; - if (opts.fallback) { - lroOptions.protoJson = protoFilesRoot; - lroOptions.httpRules = [{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/*}/operations',}]; - } - this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); - const reconcileTagsResponse = protoFilesRoot.lookup( - '.google.cloud.datacatalog.v1.ReconcileTagsResponse') as gax.protobuf.Type; - const reconcileTagsMetadata = protoFilesRoot.lookup( - '.google.cloud.datacatalog.v1.ReconcileTagsMetadata') as gax.protobuf.Type; - const importEntriesResponse = protoFilesRoot.lookup( - '.google.cloud.datacatalog.v1.ImportEntriesResponse') as gax.protobuf.Type; - const importEntriesMetadata = protoFilesRoot.lookup( - '.google.cloud.datacatalog.v1.ImportEntriesMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - reconcileTags: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - reconcileTagsResponse.decode.bind(reconcileTagsResponse), - reconcileTagsMetadata.decode.bind(reconcileTagsMetadata)), - importEntries: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - importEntriesResponse.decode.bind(importEntriesResponse), - importEntriesMetadata.decode.bind(importEntriesMetadata)) - }; - - // 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', 'reconcileTags', 'starEntry', 'unstarEntry', 'setIamPolicy', 'getIamPolicy', 'testIamPermissions', 'importEntries', 'setConfig', 'retrieveConfig', 'retrieveEffectiveConfig']; - 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] || - this.descriptors.longrunning[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. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'datacatalog.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'datacatalog.googleapis.com'; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - get apiEndpoint() { - return this._servicePath; - } - - get universeDomain() { - return this._universeDomain; - } - - /** - * The port for this API service. - * @returns {number} The default port for this service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - * @returns {string[]} List of default scopes. - */ - static get scopes() { - return [ - 'https://www.googleapis.com/auth/cloud-platform' - ]; - } - - getProjectId(): Promise; - getProjectId(callback: Callback): void; - /** - * Return the project ID used by this class. - * @returns {Promise} A promise that resolves to string containing the project ID. - */ - getProjectId(callback?: Callback): - Promise|void { - if (callback) { - this.auth.getProjectId(callback); - return; - } - return this.auth.getProjectId(); - } - - // ------------------- - // -- Service calls -- - // ------------------- -/** - * 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 {@link protos.google.cloud.datacatalog.v1.EntryGroup|EntryGroup}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.EntryGroup|EntryGroup}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.EntryGroup|EntryGroup}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.Entry|Entry}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.Entry|Entry}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 protos.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 {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.Entry|Entry}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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)](https://cloud.google.com//data-catalog/docs/fully-qualified-names) - * 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 {string} request.project - * Project where the lookup should be performed. Required to lookup - * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` - * using its `fully_qualified_name`. Ignored in other cases. - * @param {string} request.location - * Location where the lookup should be performed. Required to lookup - * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` - * using its `fully_qualified_name`. Ignored in other cases. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.datacatalog.v1.Entry|Entry}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 protos.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 {@link protos.google.cloud.datacatalog.v1.EntryOverview|EntryOverview}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 protos.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 {@link protos.google.cloud.datacatalog.v1.Contacts|Contacts}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.TagTemplate|TagTemplate}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.TagTemplate|TagTemplate}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.TagTemplate|TagTemplate}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.TagTemplateField|TagTemplateField}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.TagTemplateField|TagTemplateField}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.TagTemplateField|TagTemplateField}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.TagTemplateField|TagTemplateField}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 protos.google.cloud.datacatalog.v1.Entry|Entry} if the method name is - * `projects.locations.entryGroups.entries.tags.create`. - * * Or {@link protos.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 {@link protos.google.cloud.datacatalog.v1.Tag|Tag}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.Tag|Tag}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 protos.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 {@link protos.google.cloud.datacatalog.v1.StarEntryResponse|StarEntryResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 protos.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 {@link protos.google.cloud.datacatalog.v1.UnstarEntryResponse|UnstarEntryResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.iam.v1.Policy|Policy}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.iam.v1.Policy|Policy}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.iam.v1.TestIamPermissionsResponse|TestIamPermissionsResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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); - } -/** - * Sets the configuration related to the migration to Dataplex for an - * organization or project. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The organization or project whose config is being specified. - * @param {google.cloud.datacatalog.v1.TagTemplateMigration} request.tagTemplateMigration - * Opt-in status for the migration of Tag Templates to Dataplex. - * @param {google.cloud.datacatalog.v1.CatalogUIExperience} request.catalogUiExperience - * Opt-in status for the UI switch to Dataplex. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.datacatalog.v1.MigrationConfig|MigrationConfig}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.set_config.js - * region_tag:datacatalog_v1_generated_DataCatalog_SetConfig_async - */ - setConfig( - request?: protos.google.cloud.datacatalog.v1.ISetConfigRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datacatalog.v1.IMigrationConfig, - protos.google.cloud.datacatalog.v1.ISetConfigRequest|undefined, {}|undefined - ]>; - setConfig( - request: protos.google.cloud.datacatalog.v1.ISetConfigRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.IMigrationConfig, - protos.google.cloud.datacatalog.v1.ISetConfigRequest|null|undefined, - {}|null|undefined>): void; - setConfig( - request: protos.google.cloud.datacatalog.v1.ISetConfigRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.IMigrationConfig, - protos.google.cloud.datacatalog.v1.ISetConfigRequest|null|undefined, - {}|null|undefined>): void; - setConfig( - request?: protos.google.cloud.datacatalog.v1.ISetConfigRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.datacatalog.v1.IMigrationConfig, - protos.google.cloud.datacatalog.v1.ISetConfigRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.datacatalog.v1.IMigrationConfig, - protos.google.cloud.datacatalog.v1.ISetConfigRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.datacatalog.v1.IMigrationConfig, - protos.google.cloud.datacatalog.v1.ISetConfigRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.setConfig(request, options, callback); - } -/** - * Retrieves the configuration related to the migration from Data Catalog to - * Dataplex for a specific organization, including all the projects under it - * which have a separate configuration set. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The organization whose config is being retrieved. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.datacatalog.v1.OrganizationConfig|OrganizationConfig}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.retrieve_config.js - * region_tag:datacatalog_v1_generated_DataCatalog_RetrieveConfig_async - */ - retrieveConfig( - request?: protos.google.cloud.datacatalog.v1.IRetrieveConfigRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datacatalog.v1.IOrganizationConfig, - protos.google.cloud.datacatalog.v1.IRetrieveConfigRequest|undefined, {}|undefined - ]>; - retrieveConfig( - request: protos.google.cloud.datacatalog.v1.IRetrieveConfigRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.IOrganizationConfig, - protos.google.cloud.datacatalog.v1.IRetrieveConfigRequest|null|undefined, - {}|null|undefined>): void; - retrieveConfig( - request: protos.google.cloud.datacatalog.v1.IRetrieveConfigRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.IOrganizationConfig, - protos.google.cloud.datacatalog.v1.IRetrieveConfigRequest|null|undefined, - {}|null|undefined>): void; - retrieveConfig( - request?: protos.google.cloud.datacatalog.v1.IRetrieveConfigRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.datacatalog.v1.IOrganizationConfig, - protos.google.cloud.datacatalog.v1.IRetrieveConfigRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.datacatalog.v1.IOrganizationConfig, - protos.google.cloud.datacatalog.v1.IRetrieveConfigRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.datacatalog.v1.IOrganizationConfig, - protos.google.cloud.datacatalog.v1.IRetrieveConfigRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.retrieveConfig(request, options, callback); - } -/** - * Retrieves the effective configuration related to the migration from Data - * Catalog to Dataplex for a specific organization or project. If there is no - * specific configuration set for the resource, the setting is checked - * hierarchicahlly through the ancestors of the resource, starting from the - * resource itself. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource whose effective config is being retrieved. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.datacatalog.v1.MigrationConfig|MigrationConfig}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.retrieve_effective_config.js - * region_tag:datacatalog_v1_generated_DataCatalog_RetrieveEffectiveConfig_async - */ - retrieveEffectiveConfig( - request?: protos.google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datacatalog.v1.IMigrationConfig, - protos.google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest|undefined, {}|undefined - ]>; - retrieveEffectiveConfig( - request: protos.google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.IMigrationConfig, - protos.google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest|null|undefined, - {}|null|undefined>): void; - retrieveEffectiveConfig( - request: protos.google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.IMigrationConfig, - protos.google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest|null|undefined, - {}|null|undefined>): void; - retrieveEffectiveConfig( - request?: protos.google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.datacatalog.v1.IMigrationConfig, - protos.google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.datacatalog.v1.IMigrationConfig, - protos.google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.datacatalog.v1.IMigrationConfig, - protos.google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.retrieveEffectiveConfig(request, options, callback); - } - -/** - * `ReconcileTags` creates or updates a list of tags on the entry. - * If the - * {@link protos.google.cloud.datacatalog.v1.ReconcileTagsRequest.force_delete_missing|ReconcileTagsRequest.force_delete_missing} - * parameter is set, the operation deletes tags not included in the input tag - * list. - * - * `ReconcileTags` returns a [long-running operation] - * [google.longrunning.Operation] resource that can be queried with - * {@link protos.google.longrunning.Operations.GetOperation|Operations.GetOperation} - * to return [ReconcileTagsMetadata] - * [google.cloud.datacatalog.v1.ReconcileTagsMetadata] and - * a [ReconcileTagsResponse] - * [google.cloud.datacatalog.v1.ReconcileTagsResponse] message. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Name of {@link protos.google.cloud.datacatalog.v1.Entry|Entry} to be tagged. - * @param {string} request.tagTemplate - * Required. The name of the tag template, which is used for reconciliation. - * @param {boolean} request.forceDeleteMissing - * If set to `true`, deletes entry tags related to a tag template - * not listed in the tags source from an entry. If set to `false`, - * unlisted tags are retained. - * @param {number[]} request.tags - * A list of tags to apply to an entry. A tag can specify a - * tag template, which must be the template specified in the - * `ReconcileTagsRequest`. - * The sole entry and each of its columns must be mentioned at most once. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.reconcile_tags.js - * region_tag:datacatalog_v1_generated_DataCatalog_ReconcileTags_async - */ - reconcileTags( - request?: protos.google.cloud.datacatalog.v1.IReconcileTagsRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - reconcileTags( - request: protos.google.cloud.datacatalog.v1.IReconcileTagsRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - reconcileTags( - request: protos.google.cloud.datacatalog.v1.IReconcileTagsRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - reconcileTags( - request?: protos.google.cloud.datacatalog.v1.IReconcileTagsRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize(); - return this.innerApiCalls.reconcileTags(request, options, callback); - } -/** - * Check the status of the long running operation returned by `reconcileTags()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.reconcile_tags.js - * region_tag:datacatalog_v1_generated_DataCatalog_ReconcileTags_async - */ - async checkReconcileTagsProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.reconcileTags, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Imports entries from a source, such as data previously dumped into a - * Cloud Storage bucket, into Data Catalog. Import of entries - * is a sync operation that reconciles the state of the third-party system - * with the Data Catalog. - * - * `ImportEntries` accepts source data snapshots of a third-party system. - * Snapshot should be delivered as a .wire or base65-encoded .txt file - * containing a sequence of Protocol Buffer messages of - * {@link protos.google.cloud.datacatalog.v1.DumpItem|DumpItem} type. - * - * `ImportEntries` returns a [long-running operation] - * [google.longrunning.Operation] resource that can be queried with - * {@link protos.google.longrunning.Operations.GetOperation|Operations.GetOperation} - * to return - * {@link protos.google.cloud.datacatalog.v1.ImportEntriesMetadata|ImportEntriesMetadata} - * and an - * {@link protos.google.cloud.datacatalog.v1.ImportEntriesResponse|ImportEntriesResponse} - * message. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Target entry group for ingested entries. - * @param {string} request.gcsBucketPath - * Path to a Cloud Storage bucket that contains a dump ready for ingestion. - * @param {string} [request.jobId] - * Optional. (Optional) Dataplex task job id, if specified will be used as - * part of ImportEntries LRO ID - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.import_entries.js - * region_tag:datacatalog_v1_generated_DataCatalog_ImportEntries_async - */ - importEntries( - request?: protos.google.cloud.datacatalog.v1.IImportEntriesRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - importEntries( - request: protos.google.cloud.datacatalog.v1.IImportEntriesRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - importEntries( - request: protos.google.cloud.datacatalog.v1.IImportEntriesRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - importEntries( - request?: protos.google.cloud.datacatalog.v1.IImportEntriesRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize(); - return this.innerApiCalls.importEntries(request, options, callback); - } -/** - * Check the status of the long running operation returned by `importEntries()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.import_entries.js - * region_tag:datacatalog_v1_generated_DataCatalog_ImportEntries_async - */ - async checkImportEntriesProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.importEntries, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * 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 - * Upper bound on the number of results you can get in a single response. - * - * 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 protos.google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token|SearchCatalogResponse.next_page_token} - * field of the response to a previous - * {@link protos.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 - * - * 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. - * If you are experiencing recall issues and you don't have to fetch the - * results in any specific order, consider setting this parameter to - * `default`. - * - * If this parameter is omitted, it defaults to the descending `relevance`. - * @param {boolean} [request.adminSearch] - * Optional. If set, use searchAll permission granted on organizations from - * `include_org_ids` and projects from `include_project_ids` instead of the - * fine grained per resource permissions when filtering the search results. - * The only allowed `order_by` criteria for admin_search mode is `default`. - * Using this flags guarantees a full recall of the 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 Array of {@link protos.google.cloud.datacatalog.v1.SearchCatalogResult|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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 - * Upper bound on the number of results you can get in a single response. - * - * 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 protos.google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token|SearchCatalogResponse.next_page_token} - * field of the response to a previous - * {@link protos.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 - * - * 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. - * If you are experiencing recall issues and you don't have to fetch the - * results in any specific order, consider setting this parameter to - * `default`. - * - * If this parameter is omitted, it defaults to the descending `relevance`. - * @param {boolean} [request.adminSearch] - * Optional. If set, use searchAll permission granted on organizations from - * `include_org_ids` and projects from `include_project_ids` instead of the - * fine grained per resource permissions when filtering the search results. - * The only allowed `order_by` criteria for admin_search mode is `default`. - * Using this flags guarantees a full recall of the search results. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.datacatalog.v1.SearchCatalogResult|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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 - * Upper bound on the number of results you can get in a single response. - * - * 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 protos.google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token|SearchCatalogResponse.next_page_token} - * field of the response to a previous - * {@link protos.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 - * - * 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. - * If you are experiencing recall issues and you don't have to fetch the - * results in any specific order, consider setting this parameter to - * `default`. - * - * If this parameter is omitted, it defaults to the descending `relevance`. - * @param {boolean} [request.adminSearch] - * Optional. If set, use searchAll permission granted on organizations from - * `include_org_ids` and projects from `include_project_ids` instead of the - * fine grained per resource permissions when filtering the search results. - * The only allowed `order_by` criteria for admin_search mode is `default`. - * Using this flags guarantees a full recall of the search results. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.datacatalog.v1.SearchCatalogResult|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.EntryGroup|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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 {@link protos.google.cloud.datacatalog.v1.EntryGroup|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.datacatalog.v1.EntryGroup|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 protos.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 {@link protos.google.cloud.datacatalog.v1.Entry|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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 {@link protos.google.cloud.datacatalog.v1.Entry|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.datacatalog.v1.Entry|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 protos.google.cloud.datacatalog.v1.Entry|Entry}. - * The {@link protos.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 protos.google.cloud.datacatalog.v1.Entry|Entry} - * or an {@link protos.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 {@link protos.google.cloud.datacatalog.v1.Tag|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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 protos.google.cloud.datacatalog.v1.Entry|Entry} - * or an {@link protos.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 {@link protos.google.cloud.datacatalog.v1.Tag|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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 protos.google.cloud.datacatalog.v1.Entry|Entry} - * or an {@link protos.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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.datacatalog.v1.Tag|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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(); - this.operationsClient.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/data_catalog_client_config.json b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/data_catalog_client_config.json deleted file mode 100644 index d0baff98089..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/data_catalog_client_config.json +++ /dev/null @@ -1,216 +0,0 @@ -{ - "interfaces": { - "google.cloud.datacatalog.v1.DataCatalog": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "resource_exhausted_internal_unavailable": [ - "RESOURCE_EXHAUSTED", - "INTERNAL", - "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": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "CreateEntryGroup": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "GetEntryGroup": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "UpdateEntryGroup": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "DeleteEntryGroup": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "ListEntryGroups": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "CreateEntry": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "UpdateEntry": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "DeleteEntry": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "GetEntry": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "LookupEntry": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "ListEntries": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "ModifyEntryOverview": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "ModifyEntryContacts": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "CreateTagTemplate": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "GetTagTemplate": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "UpdateTagTemplate": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "DeleteTagTemplate": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "CreateTagTemplateField": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "UpdateTagTemplateField": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "RenameTagTemplateField": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "RenameTagTemplateFieldEnumValue": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "DeleteTagTemplateField": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "CreateTag": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "UpdateTag": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "DeleteTag": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "ListTags": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "ReconcileTags": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "StarEntry": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "UnstarEntry": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "ImportEntries": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "SetConfig": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "RetrieveConfig": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "RetrieveEffectiveConfig": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/data_catalog_proto_list.json b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/data_catalog_proto_list.json deleted file mode 100644 index e2d2eeac32a..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/data_catalog_proto_list.json +++ /dev/null @@ -1,18 +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/dump_content.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/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/gapic_metadata.json deleted file mode 100644 index ef8a3b561bf..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/gapic_metadata.json +++ /dev/null @@ -1,605 +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" - ] - }, - "SetConfig": { - "methods": [ - "setConfig" - ] - }, - "RetrieveConfig": { - "methods": [ - "retrieveConfig" - ] - }, - "RetrieveEffectiveConfig": { - "methods": [ - "retrieveEffectiveConfig" - ] - }, - "ReconcileTags": { - "methods": [ - "reconcileTags" - ] - }, - "ImportEntries": { - "methods": [ - "importEntries" - ] - }, - "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" - ] - }, - "SetConfig": { - "methods": [ - "setConfig" - ] - }, - "RetrieveConfig": { - "methods": [ - "retrieveConfig" - ] - }, - "RetrieveEffectiveConfig": { - "methods": [ - "retrieveEffectiveConfig" - ] - }, - "ReconcileTags": { - "methods": [ - "reconcileTags" - ] - }, - "ImportEntries": { - "methods": [ - "importEntries" - ] - }, - "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/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/index.ts b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/index.ts deleted file mode 100644 index a6998a86c14..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_client.ts b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_client.ts deleted file mode 100644 index 78dba3e5ec7..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_client.ts +++ /dev/null @@ -1,2055 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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}; - private _universeDomain: string; - private _servicePath: string; - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - pathTemplates: {[name: string]: gax.PathTemplate}; - 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} [options.fallback] - Use HTTP/1.1 REST mode. - * For more information, please check the - * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you - * need to avoid loading the default gRPC version and want to use the fallback - * HTTP implementation. Load only fallback version and pass it to the constructor: - * ``` - * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC - * const client = new PolicyTagManagerClient({fallback: true}, gax); - * ``` - */ - constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof PolicyTagManagerClient; - if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { - throw new Error('Please set either universe_domain or universeDomain, but not both.'); - } - const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; - this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; - this._servicePath = 'datacatalog.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - 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. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'datacatalog.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'datacatalog.googleapis.com'; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - get apiEndpoint() { - return this._servicePath; - } - - get universeDomain() { - return this._universeDomain; - } - - /** - * The port for this API service. - * @returns {number} The default port for this service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - * @returns {string[]} List of default scopes. - */ - static get scopes() { - return [ - 'https://www.googleapis.com/auth/cloud-platform' - ]; - } - - getProjectId(): Promise; - getProjectId(callback: Callback): void; - /** - * Return the project ID used by this class. - * @returns {Promise} A promise that resolves to string containing the project ID. - */ - getProjectId(callback?: Callback): - Promise|void { - if (callback) { - this.auth.getProjectId(callback); - return; - } - return this.auth.getProjectId(); - } - - // ------------------- - // -- Service calls -- - // ------------------- -/** - * 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 {@link protos.google.cloud.datacatalog.v1.Taxonomy|Taxonomy}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.Taxonomy|Taxonomy}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.Taxonomy|Taxonomy}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.PolicyTag|PolicyTag}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.PolicyTag|PolicyTag}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.PolicyTag|PolicyTag}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.iam.v1.Policy|Policy}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.iam.v1.Policy|Policy}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.iam.v1.TestIamPermissionsResponse|TestIamPermissionsResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {string} request.filter - * Supported field for filter is 'service' and value is 'dataplex'. - * Eg: service=dataplex. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.datacatalog.v1.Taxonomy|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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 {string} request.filter - * Supported field for filter is 'service' and value is 'dataplex'. - * Eg: service=dataplex. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.datacatalog.v1.Taxonomy|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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 {string} request.filter - * Supported field for filter is 'service' and value is 'dataplex'. - * Eg: service=dataplex. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.datacatalog.v1.Taxonomy|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.PolicyTag|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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 {@link protos.google.cloud.datacatalog.v1.PolicyTag|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.datacatalog.v1.PolicyTag|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_client_config.json b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_client_config.json deleted file mode 100644 index 03093f81c44..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/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/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_proto_list.json b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_proto_list.json deleted file mode 100644 index e2d2eeac32a..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_proto_list.json +++ /dev/null @@ -1,18 +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/dump_content.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/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_serialization_client.ts b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_serialization_client.ts deleted file mode 100644 index 7cdfbbc766c..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_serialization_client.ts +++ /dev/null @@ -1,1085 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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}; - private _universeDomain: string; - private _servicePath: string; - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - pathTemplates: {[name: string]: gax.PathTemplate}; - 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} [options.fallback] - Use HTTP/1.1 REST mode. - * For more information, please check the - * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you - * need to avoid loading the default gRPC version and want to use the fallback - * HTTP implementation. Load only fallback version and pass it to the constructor: - * ``` - * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC - * const client = new PolicyTagManagerSerializationClient({fallback: true}, gax); - * ``` - */ - constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof PolicyTagManagerSerializationClient; - if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { - throw new Error('Please set either universe_domain or universeDomain, but not both.'); - } - const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; - this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; - this._servicePath = 'datacatalog.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - 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. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'datacatalog.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'datacatalog.googleapis.com'; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - get apiEndpoint() { - return this._servicePath; - } - - get universeDomain() { - return this._universeDomain; - } - - /** - * The port for this API service. - * @returns {number} The default port for this service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - * @returns {string[]} List of default scopes. - */ - static get scopes() { - return [ - 'https://www.googleapis.com/auth/cloud-platform' - ]; - } - - getProjectId(): Promise; - getProjectId(callback: Callback): void; - /** - * Return the project ID used by this class. - * @returns {Promise} A promise that resolves to string containing the project ID. - */ - getProjectId(callback?: Callback): - Promise|void { - if (callback) { - this.auth.getProjectId(callback); - return; - } - return this.auth.getProjectId(); - } - - // ------------------- - // -- Service calls -- - // ------------------- -/** - * 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 {@link protos.google.cloud.datacatalog.v1.Taxonomy|Taxonomy}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.ImportTaxonomiesResponse|ImportTaxonomiesResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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 {@link protos.google.cloud.datacatalog.v1.ExportTaxonomiesResponse|ExportTaxonomiesResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/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/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_serialization_client_config.json b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_serialization_client_config.json deleted file mode 100644 index 505c5d7f2c6..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/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/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_serialization_proto_list.json b/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_serialization_proto_list.json deleted file mode 100644 index e2d2eeac32a..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/src/v1/policy_tag_manager_serialization_proto_list.json +++ /dev/null @@ -1,18 +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/dump_content.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/owl-bot-staging/google-cloud-datacatalog/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-datacatalog/v1/system-test/fixtures/sample/src/index.js deleted file mode 100644 index 5b474f9796d..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-datacatalog/v1/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index 4c012b3d052..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1/system-test/install.ts b/owl-bot-staging/google-cloud-datacatalog/v1/system-test/install.ts deleted file mode 100644 index 2a505d6df0c..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/system-test/install.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import {packNTest} from 'pack-n-play'; -import {readFileSync} from 'fs'; -import {describe, it} from 'mocha'; - -describe('📦 pack-n-play test', () => { - - it('TypeScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'TypeScript user can use the type definitions', - ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() - } - }; - await packNTest(options); - }); - - it('JavaScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'JavaScript user can use the library', - ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() - } - }; - await packNTest(options); - }); - -}); diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/test/gapic_data_catalog_v1.ts b/owl-bot-staging/google-cloud-datacatalog/v1/test/gapic_data_catalog_v1.ts deleted file mode 100644 index 2eda2279722..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/test/gapic_data_catalog_v1.ts +++ /dev/null @@ -1,5321 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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, LROperation, operationsProtos} from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function getTypeDefaultValue(typeName: string, fields: string[]) { - let type = root.lookupType(typeName) as protobuf.Type; - for (const field of fields.slice(0, -1)) { - type = type.fields[field]?.resolvedType as protobuf.Type; - } - return type.fields[fields[fields.length - 1]]?.defaultValue; -} - -function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message) - .toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { - return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); -} - -function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); -} - -function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); -} - -function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { - const pagingStub = sinon.stub(); - if (responses) { - for (let i = 0; i < responses.length; ++i) { - pagingStub.onCall(i).callsArgWith(2, null, responses[i]); - } - } - const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; - const mockStream = new PassThrough({ - objectMode: true, - transform: transformStub, - }); - // trigger as many responses as needed - if (responses) { - for (let i = 0; i < responses.length; ++i) { - setImmediate(() => { mockStream.write({}); }); - } - setImmediate(() => { mockStream.end(); }); - } else { - setImmediate(() => { mockStream.write({}); }); - setImmediate(() => { mockStream.end(); }); - } - return sinon.stub().returns(mockStream); -} - -function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { - let counter = 0; - const asyncIterable = { - [Symbol.asyncIterator]() { - return { - async next() { - if (error) { - return Promise.reject(error); - } - if (counter >= responses!.length) { - return Promise.resolve({done: true, value: undefined}); - } - return Promise.resolve({done: false, value: responses![counter++]}); - } - }; - } - }; - return sinon.stub().returns(asyncIterable); -} - -describe('v1.DataCatalogClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new datacatalogModule.v1.DataCatalogClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new datacatalogModule.v1.DataCatalogClient(); - const universeDomain = client.universeDomain; - assert.strictEqual(universeDomain, "googleapis.com"); - }); - - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - it('throws DeprecationWarning if static servicePath is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const servicePath = datacatalogModule.v1.DataCatalogClient.servicePath; - assert.strictEqual(servicePath, 'datacatalog.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = datacatalogModule.v1.DataCatalogClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new datacatalogModule.v1.DataCatalogClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new datacatalogModule.v1.DataCatalogClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.example.com'); - }); - - if (typeof process === 'object' && 'env' in process) { - describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { - it('sets apiEndpoint from environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new datacatalogModule.v1.DataCatalogClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - - it('value configured in code has priority over environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new datacatalogModule.v1.DataCatalogClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.configured.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - }); - } - it('does not allow setting both universeDomain and universe_domain', () => { - assert.throws(() => { new datacatalogModule.v1.DataCatalogClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - 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('setConfig', () => { - it('invokes setConfig 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.SetConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datacatalog.v1.SetConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.MigrationConfig() - ); - client.innerApiCalls.setConfig = stubSimpleCall(expectedResponse); - const [response] = await client.setConfig(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setConfig 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.SetConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datacatalog.v1.SetConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.MigrationConfig() - ); - client.innerApiCalls.setConfig = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setConfig( - request, - (err?: Error|null, result?: protos.google.cloud.datacatalog.v1.IMigrationConfig|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setConfig 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.SetConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datacatalog.v1.SetConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setConfig = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.setConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setConfig 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.SetConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datacatalog.v1.SetConfigRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setConfig(request), expectedError); - }); - }); - - describe('retrieveConfig', () => { - it('invokes retrieveConfig 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.RetrieveConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datacatalog.v1.RetrieveConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.OrganizationConfig() - ); - client.innerApiCalls.retrieveConfig = stubSimpleCall(expectedResponse); - const [response] = await client.retrieveConfig(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.retrieveConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.retrieveConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes retrieveConfig 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.RetrieveConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datacatalog.v1.RetrieveConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.OrganizationConfig() - ); - client.innerApiCalls.retrieveConfig = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.retrieveConfig( - request, - (err?: Error|null, result?: protos.google.cloud.datacatalog.v1.IOrganizationConfig|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.retrieveConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.retrieveConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes retrieveConfig 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.RetrieveConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datacatalog.v1.RetrieveConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.retrieveConfig = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.retrieveConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.retrieveConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.retrieveConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes retrieveConfig 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.RetrieveConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datacatalog.v1.RetrieveConfigRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.retrieveConfig(request), expectedError); - }); - }); - - describe('retrieveEffectiveConfig', () => { - it('invokes retrieveEffectiveConfig 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.RetrieveEffectiveConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.MigrationConfig() - ); - client.innerApiCalls.retrieveEffectiveConfig = stubSimpleCall(expectedResponse); - const [response] = await client.retrieveEffectiveConfig(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.retrieveEffectiveConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.retrieveEffectiveConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes retrieveEffectiveConfig 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.RetrieveEffectiveConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.MigrationConfig() - ); - client.innerApiCalls.retrieveEffectiveConfig = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.retrieveEffectiveConfig( - request, - (err?: Error|null, result?: protos.google.cloud.datacatalog.v1.IMigrationConfig|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.retrieveEffectiveConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.retrieveEffectiveConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes retrieveEffectiveConfig 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.RetrieveEffectiveConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.retrieveEffectiveConfig = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.retrieveEffectiveConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.retrieveEffectiveConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.retrieveEffectiveConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes retrieveEffectiveConfig 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.RetrieveEffectiveConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.retrieveEffectiveConfig(request), expectedError); - }); - }); - - describe('reconcileTags', () => { - it('invokes reconcileTags 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.ReconcileTagsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datacatalog.v1.ReconcileTagsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.reconcileTags = stubLongRunningCall(expectedResponse); - const [operation] = await client.reconcileTags(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.reconcileTags as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.reconcileTags as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes reconcileTags 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.ReconcileTagsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datacatalog.v1.ReconcileTagsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.reconcileTags = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.reconcileTags( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.reconcileTags as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.reconcileTags as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes reconcileTags with call 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.ReconcileTagsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datacatalog.v1.ReconcileTagsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.reconcileTags = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.reconcileTags(request), expectedError); - const actualRequest = (client.innerApiCalls.reconcileTags as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.reconcileTags as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes reconcileTags with LRO 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.ReconcileTagsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datacatalog.v1.ReconcileTagsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.reconcileTags = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.reconcileTags(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.reconcileTags as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.reconcileTags as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkReconcileTagsProgress without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkReconcileTagsProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkReconcileTagsProgress with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkReconcileTagsProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('importEntries', () => { - it('invokes importEntries 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.ImportEntriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datacatalog.v1.ImportEntriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.importEntries = stubLongRunningCall(expectedResponse); - const [operation] = await client.importEntries(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.importEntries as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importEntries as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importEntries 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.ImportEntriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datacatalog.v1.ImportEntriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.importEntries = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.importEntries( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.importEntries as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importEntries as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importEntries with call 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.ImportEntriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datacatalog.v1.ImportEntriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.importEntries = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.importEntries(request), expectedError); - const actualRequest = (client.innerApiCalls.importEntries as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importEntries as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importEntries with LRO 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.ImportEntriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datacatalog.v1.ImportEntriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.importEntries = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.importEntries(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.importEntries as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importEntries as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkImportEntriesProgress without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkImportEntriesProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkImportEntriesProgress with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkImportEntriesProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - 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/owl-bot-staging/google-cloud-datacatalog/v1/test/gapic_policy_tag_manager_serialization_v1.ts b/owl-bot-staging/google-cloud-datacatalog/v1/test/gapic_policy_tag_manager_serialization_v1.ts deleted file mode 100644 index e88d8b77d3f..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/test/gapic_policy_tag_manager_serialization_v1.ts +++ /dev/null @@ -1,971 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 apiEndpoint', () => { - const client = new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient(); - const universeDomain = client.universeDomain; - assert.strictEqual(universeDomain, "googleapis.com"); - }); - - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - it('throws DeprecationWarning if static servicePath is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const servicePath = policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient.servicePath; - assert.strictEqual(servicePath, 'datacatalog.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.example.com'); - }); - - if (typeof process === 'object' && 'env' in process) { - describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { - it('sets apiEndpoint from environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - - it('value configured in code has priority over environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.configured.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - }); - } - it('does not allow setting both universeDomain and universe_domain', () => { - assert.throws(() => { new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - 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/owl-bot-staging/google-cloud-datacatalog/v1/test/gapic_policy_tag_manager_v1.ts b/owl-bot-staging/google-cloud-datacatalog/v1/test/gapic_policy_tag_manager_v1.ts deleted file mode 100644 index e3a954323c9..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/test/gapic_policy_tag_manager_v1.ts +++ /dev/null @@ -1,2380 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 apiEndpoint', () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient(); - const universeDomain = client.universeDomain; - assert.strictEqual(universeDomain, "googleapis.com"); - }); - - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - it('throws DeprecationWarning if static servicePath is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const servicePath = policytagmanagerModule.v1.PolicyTagManagerClient.servicePath; - assert.strictEqual(servicePath, 'datacatalog.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = policytagmanagerModule.v1.PolicyTagManagerClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.example.com'); - }); - - if (typeof process === 'object' && 'env' in process) { - describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { - it('sets apiEndpoint from environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new policytagmanagerModule.v1.PolicyTagManagerClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - - it('value configured in code has priority over environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.configured.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - }); - } - it('does not allow setting both universeDomain and universe_domain', () => { - assert.throws(() => { new policytagmanagerModule.v1.PolicyTagManagerClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - 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/owl-bot-staging/google-cloud-datacatalog/v1/tsconfig.json b/owl-bot-staging/google-cloud-datacatalog/v1/tsconfig.json deleted file mode 100644 index c78f1c884ef..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "./node_modules/gts/tsconfig-google.json", - "compilerOptions": { - "rootDir": ".", - "outDir": "build", - "resolveJsonModule": true, - "lib": [ - "es2018", - "dom" - ] - }, - "include": [ - "src/*.ts", - "src/**/*.ts", - "test/*.ts", - "test/**/*.ts", - "system-test/*.ts" - ] -} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1/webpack.config.js b/owl-bot-staging/google-cloud-datacatalog/v1/webpack.config.js deleted file mode 100644 index 95cf943fced..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1/webpack.config.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -const path = require('path'); - -module.exports = { - entry: './src/index.ts', - output: { - library: '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', -}; diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/.eslintignore b/owl-bot-staging/google-cloud-datacatalog/v1beta1/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/.eslintignore +++ /dev/null @@ -1,7 +0,0 @@ -**/node_modules -**/.coverage -build/ -docs/ -protos/ -system-test/ -samples/generated/ diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/.eslintrc.json b/owl-bot-staging/google-cloud-datacatalog/v1beta1/.eslintrc.json deleted file mode 100644 index 78215349546..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/.gitignore b/owl-bot-staging/google-cloud-datacatalog/v1beta1/.gitignore deleted file mode 100644 index d4f03a0df2e..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -**/*.log -**/node_modules -/.coverage -/coverage -/.nyc_output -/docs/ -/out/ -/build/ -system-test/secrets.js -system-test/*key.json -*.lock -.DS_Store -package-lock.json -__pycache__ diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/.jsdoc.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/.jsdoc.js deleted file mode 100644 index ac28df7d11a..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/.jsdoc.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 2025 Google LLC', - includeDate: false, - sourceFiles: false, - systemName: '@google-cloud/datacatalog', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/.mocharc.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/.mocharc.js deleted file mode 100644 index 24e9d15257f..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/.mocharc.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -const config = { - "enable-source-maps": true, - "throw-deprecation": true, - "timeout": 10000 -} -if (process.env.MOCHA_THROW_DEPRECATION === 'false') { - delete config['throw-deprecation']; -} -if (process.env.MOCHA_REPORTER) { - config.reporter = process.env.MOCHA_REPORTER; -} -if (process.env.MOCHA_REPORTER_OUTPUT) { - config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; -} -module.exports = config diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/.prettierrc.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/.prettierrc.js deleted file mode 100644 index d89a632f90b..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/.prettierrc.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - -module.exports = { - ...require('gts/.prettierrc.json') -} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/README.md b/owl-bot-staging/google-cloud-datacatalog/v1beta1/README.md deleted file mode 100644 index 32cb6c97c40..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/README.md +++ /dev/null @@ -1 +0,0 @@ -Datacatalog: Nodejs Client diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/package.json b/owl-bot-staging/google-cloud-datacatalog/v1beta1/package.json deleted file mode 100644 index 422f93bf7e4..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "@google-cloud/datacatalog", - "version": "0.1.0", - "description": "Datacatalog client for Node.js", - "repository": "googleapis/nodejs-datacatalog", - "license": "Apache-2.0", - "author": "Google LLC", - "main": "build/src/index.js", - "files": [ - "build/src", - "build/protos" - ], - "keywords": [ - "google apis client", - "google api client", - "google apis", - "google api", - "google", - "google cloud platform", - "google cloud", - "cloud", - "google datacatalog", - "datacatalog", - "data catalog", - "policy tag manager", - "policy tag manager serialization" - ], - "scripts": { - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", - "compile-protos": "compileProtos src", - "docs": "jsdoc -c .jsdoc.js", - "fix": "gts fix", - "lint": "gts check", - "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test" - }, - "dependencies": { - "google-gax": "^4.3.4" - }, - "devDependencies": { - "@types/mocha": "^10.0.6", - "@types/node": "^20.12.12", - "@types/sinon": "^10.0.20", - "c8": "^9.1.0", - "gapic-tools": "^0.4.2", - "gts": "5.3.0", - "jsdoc": "^4.0.3", - "jsdoc-fresh": "^3.0.0", - "jsdoc-region-tag": "^3.0.0", - "mocha": "^10.4.0", - "pack-n-play": "^2.0.3", - "sinon": "^15.2.0", - "typescript": "5.1.6" - }, - "engines": { - "node": ">=v14" - } -} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/common.proto b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/common.proto deleted file mode 100644 index 942cb2f8e0e..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/common.proto +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1beta1; - -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb"; -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; -} - -// This enum describes all the systems that manage -// Taxonomy and PolicyTag resources in DataCatalog. -enum ManagingSystem { - // Default value - MANAGING_SYSTEM_UNSPECIFIED = 0; - - // Dataplex. - MANAGING_SYSTEM_DATAPLEX = 1; - - // Other - MANAGING_SYSTEM_OTHER = 2; -} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/datacatalog.proto b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/datacatalog.proto deleted file mode 100644 index f534b0037f8..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/datacatalog.proto +++ /dev/null @@ -1,1315 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.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/cloud/datacatalog/v1beta1/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 csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb"; -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"; -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 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 subsequently 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"; - } - - // Renames an enum value in a tag template. The enum values have to be unique - // within one enum field. Thus, an enum value cannot be renamed with a name - // used in any other enum value within the same enum field. - rpc RenameTagTemplateFieldEnumValue(RenameTagTemplateFieldEnumValueRequest) - returns (TagTemplateField) { - option (google.api.http) = { - post: "/v1beta1/{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 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 tags assigned to an [Entry][google.cloud.datacatalog.v1beta1.Entry]. - // The [columns][google.cloud.datacatalog.v1beta1.Tag.column] in the response - // are lowercased. - 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 public datasets in the - // search results. Info on Google Cloud public datasets is available at - // https://cloud.google.com/public-datasets/. By default, Google Cloud - // public datasets are excluded. - bool include_gcp_public_datasets = 7; - - // Optional. The list of locations to search within. - // 1. If empty, search will be performed in all locations; - // 2. If any of the locations are NOT in the valid locations list, error - // will be returned; - // 3. Otherwise, search only the given locations for matching results. - // Typical usage is to leave this field empty. When a location is - // unreachable as returned in the `SearchCatalogResponse.unreachable` field, - // users can repeat the search request with this parameter set to get - // additional information on the error. - // - // Valid locations: - // * asia-east1 - // * asia-east2 - // * asia-northeast1 - // * asia-northeast2 - // * asia-northeast3 - // * asia-south1 - // * asia-southeast1 - // * australia-southeast1 - // * eu - // * europe-north1 - // * europe-west1 - // * europe-west2 - // * europe-west3 - // * europe-west4 - // * europe-west6 - // * global - // * northamerica-northeast1 - // * southamerica-east1 - // * us - // * us-central1 - // * us-east1 - // * us-east4 - // * us-west1 - // * us-west2 - repeated string restricted_locations = 16 - [(google.api.field_behavior) = OPTIONAL]; - } - - // 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]; - - // Optional. The query string in search query syntax. An empty query string - // will result in all data assets (in the specified scope) that the user has - // access to. 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) = OPTIONAL]; - - // 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 - // * `default` that can only be descending - // - // 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 approximate total number of entries matched by the query. - int32 total_size = 2; - - // The token that can be used to retrieve the next page of results. - string next_page_token = 3; - - // Unreachable locations. Search result does not include data from those - // locations. Users can get additional information on the error by repeating - // the search request with a more restrictive parameter -- setting the value - // for `SearchDataCatalogRequest.scope.restricted_locations`. - repeated string unreachable = 6; -} - -// 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]; - - // 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.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]; - - // 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. - // - // 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 should 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}" - }; - - // Output only. Identifier. 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.field_behavior) = OUTPUT_ONLY, - (google.api.field_behavior) = IDENTIFIER, - (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]; - - // Output only. Statistics on the usage level of the resource. - UsageSignal usage_signal = 13 [(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}" - }; - - // Identifier. 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 [(google.api.field_behavior) = IDENTIFIER]; - - // 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]; - - // Names of fields whose values to overwrite on a tag template. Currently, - // only `display_name` can be overwritten. - // - // 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 -// [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]; - - // Note: Currently, this parameter can only take `"fields"` as value. - // - // 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.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. 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.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 -// [RenameTagTemplateFieldEnumValue][google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateFieldEnumValue]. -message RenameTagTemplateFieldEnumValueRequest { - // Required. The name of the enum field value. Example: - // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name} - 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.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/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto deleted file mode 100644 index e8acaa0ac77..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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 csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb"; -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/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/policytagmanager.proto b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/policytagmanager.proto deleted file mode 100644 index 5d38b0ed8af..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/policytagmanager.proto +++ /dev/null @@ -1,452 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.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/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 csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb"; -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; - } - - // The source system of the Taxonomy. - message Service { - // The Google Cloud service name. - ManagingSystem name = 1; - - // The service agent for the service. - string identity = 2; - } - - // Identifier. Resource name of this taxonomy, whose format is: - // "projects/{project_number}/locations/{location_id}/taxonomies/{id}". - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // 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. - // - // The taxonomy display name must be unique within an organization. - 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]; - - // Output only. Number of policy tags contained in this taxonomy. - int32 policy_tag_count = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Timestamps about this taxonomy. Only create_time and - // update_time are used. - 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]; - - // Output only. Identity of the service which owns the Taxonomy. This field is - // only populated when the taxonomy is created by a Google Cloud service. - // Currently only 'DATAPLEX' is supported. - Service service = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// 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}" - }; - - // Identifier. 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) = IDENTIFIER]; - - // 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; - - // Supported field for filter is 'service' and value is 'dataplex'. - // Eg: service=dataplex. - string filter = 4; -} - -// 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto deleted file mode 100644 index 94f1c09a770..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.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/policytagmanager.proto"; - -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb"; -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; - - // A list of policy types that are activated for a taxonomy. - repeated Taxonomy.PolicyType activated_policy_types = 4; -} - -// Message representing one policy tag when exported as a nested proto. -message SerializedPolicyTag { - // Resource name of the policy tag. - // - // This field will be ignored when calling ImportTaxonomies. - string policy_tag = 1; - - // 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 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 be imported. - oneof source { - // Inline source used for taxonomies to be imported. - 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/schema.proto b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/schema.proto deleted file mode 100644 index 5162e2ecb84..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/schema.proto +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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 csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb"; -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/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/search.proto b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/search.proto deleted file mode 100644 index 04f89143a92..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/search.proto +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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 csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb"; -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; - - // Last-modified timestamp of the entry from the managing system. - google.protobuf.Timestamp modify_time = 7; -} - -// 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/table_spec.proto b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/table_spec.proto deleted file mode 100644 index df182bead85..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/table_spec.proto +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1beta1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; - -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb"; -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; - - // 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 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/tags.proto b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/tags.proto deleted file mode 100644 index 7762485f2cc..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/tags.proto +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1beta1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb"; -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}" - }; - - // Identifier. 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 [(google.api.field_behavior) = IDENTIFIER]; - - // 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 Google Cloud 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}" - }; - - // This enum describes TagTemplate transfer status to Dataplex service. - enum DataplexTransferStatus { - // Default value. TagTemplate and its tags are only visible and editable in - // DataCatalog. - DATAPLEX_TRANSFER_STATUS_UNSPECIFIED = 0; - - // TagTemplate and its tags are auto-copied to Dataplex service. - // Visible in both services. Editable in DataCatalog, read-only in Dataplex. - // Deprecated: Individual TagTemplate migration is deprecated in favor of - // organization or project wide TagTemplate migration opt-in. - MIGRATED = 1 [deprecated = true]; - } - - // Identifier. 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 [(google.api.field_behavior) = IDENTIFIER]; - - // 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]; - - // Output only. Transfer status of the TagTemplate - DataplexTransferStatus dataplex_transfer_status = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// 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. Identifier. 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) = IDENTIFIER, - (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 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. 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 { - 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; - } - - 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]; - } - - repeated EnumValue allowed_values = 1; - } - - // 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/timestamps.proto b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/timestamps.proto deleted file mode 100644 index b2ebbac7604..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/timestamps.proto +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1beta1; - -import "google/api/field_behavior.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb"; -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/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/usage.proto b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/usage.proto deleted file mode 100644 index 564ce752f63..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/google/cloud/datacatalog/v1beta1/usage.proto +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1beta1; - -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb"; -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"; - -// Detailed counts on the entry's usage. -// Caveats: -// - Only BigQuery tables have usage stats -// - The usage stats only include BigQuery query jobs -// - The usage stats might be underestimated, e.g. wildcard table references -// are not yet counted in usage computation -// https://cloud.google.com/bigquery/docs/querying-wildcard-tables -message UsageStats { - // The number of times that the underlying entry was successfully used. - float total_completions = 1; - - // The number of times that the underlying entry was attempted to be used - // but failed. - float total_failures = 2; - - // The number of times that the underlying entry was attempted to be used - // but was cancelled by the user. - float total_cancellations = 3; - - // Total time spent (in milliseconds) during uses the resulted in completions. - float total_execution_time_for_completions_millis = 4; -} - -// The set of all usage signals that we store in Data Catalog. -message UsageSignal { - // The timestamp of the end of the usage statistics duration. - google.protobuf.Timestamp update_time = 1; - - // Usage statistics over each of the pre-defined time ranges, supported - // strings for time ranges are {"24H", "7D", "30D"}. - map usage_within_time_range = 2; -} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/protos.d.ts b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/protos.d.ts deleted file mode 100644 index 6df5f06a403..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/protos.d.ts +++ /dev/null @@ -1,17208 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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 v1beta1. */ - namespace v1beta1 { - - /** IntegratedSystem enum. */ - enum IntegratedSystem { - INTEGRATED_SYSTEM_UNSPECIFIED = 0, - BIGQUERY = 1, - CLOUD_PUBSUB = 2 - } - - /** ManagingSystem enum. */ - enum ManagingSystem { - MANAGING_SYSTEM_UNSPECIFIED = 0, - MANAGING_SYSTEM_DATAPLEX = 1, - MANAGING_SYSTEM_OTHER = 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 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.v1beta1.IRenameTagTemplateFieldEnumValueRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.RenameTagTemplateFieldEnumValueCallback): void; - - /** - * Calls RenameTagTemplateFieldEnumValue. - * @param request RenameTagTemplateFieldEnumValueRequest message or plain object - * @returns Promise - */ - public renameTagTemplateFieldEnumValue(request: google.cloud.datacatalog.v1beta1.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.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|renameTagTemplateFieldEnumValue}. - * @param error Error, if any - * @param [response] TagTemplateField - */ - type RenameTagTemplateFieldEnumValueCallback = (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); - - /** Scope restrictedLocations */ - restrictedLocations?: (string[]|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; - - /** Scope restrictedLocations. */ - public restrictedLocations: string[]; - - /** - * 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 totalSize */ - totalSize?: (number|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.v1beta1.ISearchCatalogResponse); - - /** SearchCatalogResponse results. */ - public results: google.cloud.datacatalog.v1beta1.ISearchCatalogResult[]; - - /** SearchCatalogResponse totalSize. */ - public totalSize: number; - - /** 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.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); - - /** Entry usageSignal */ - usageSignal?: (google.cloud.datacatalog.v1beta1.IUsageSignal|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 usageSignal. */ - public usageSignal?: (google.cloud.datacatalog.v1beta1.IUsageSignal|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 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.v1beta1.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.v1beta1.IRenameTagTemplateFieldEnumValueRequest): google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest; - - /** - * Encodes the specified RenameTagTemplateFieldEnumValueRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.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.v1beta1.IRenameTagTemplateFieldEnumValueRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RenameTagTemplateFieldEnumValueRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.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); - - /** SearchCatalogResult modifyTime */ - modifyTime?: (google.protobuf.ITimestamp|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; - - /** SearchCatalogResult modifyTime. */ - public modifyTime?: (google.protobuf.ITimestamp|null); - - /** - * 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, - 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.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); - - /** TagTemplate dataplexTransferStatus */ - dataplexTransferStatus?: (google.cloud.datacatalog.v1beta1.TagTemplate.DataplexTransferStatus|keyof typeof google.cloud.datacatalog.v1beta1.TagTemplate.DataplexTransferStatus|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 }; - - /** TagTemplate dataplexTransferStatus. */ - public dataplexTransferStatus: (google.cloud.datacatalog.v1beta1.TagTemplate.DataplexTransferStatus|keyof typeof google.cloud.datacatalog.v1beta1.TagTemplate.DataplexTransferStatus); - - /** - * 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; - } - - namespace TagTemplate { - - /** DataplexTransferStatus enum. */ - enum DataplexTransferStatus { - DATAPLEX_TRANSFER_STATUS_UNSPECIFIED = 0, - MIGRATED = 1 - } - } - - /** 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 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.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 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.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 { - - /** PrimitiveType enum. */ - enum PrimitiveType { - PRIMITIVE_TYPE_UNSPECIFIED = 0, - DOUBLE = 1, - STRING = 2, - BOOL = 3, - TIMESTAMP = 4 - } - - /** 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; - } - } - } - - /** 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.v1beta1.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.v1beta1.IUsageStats): google.cloud.datacatalog.v1beta1.UsageStats; - - /** - * Encodes the specified UsageStats message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.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.v1beta1.IUsageStats, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UsageStats message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.IUsageStats }|null); - } - - /** Represents a UsageSignal. */ - class UsageSignal implements IUsageSignal { - - /** - * Constructs a new UsageSignal. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IUsageSignal); - - /** UsageSignal updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** UsageSignal usageWithinTimeRange. */ - public usageWithinTimeRange: { [k: string]: google.cloud.datacatalog.v1beta1.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.v1beta1.IUsageSignal): google.cloud.datacatalog.v1beta1.UsageSignal; - - /** - * Encodes the specified UsageSignal message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.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.v1beta1.IUsageSignal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UsageSignal message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.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 policyTagCount */ - policyTagCount?: (number|null); - - /** Taxonomy taxonomyTimestamps */ - taxonomyTimestamps?: (google.cloud.datacatalog.v1beta1.ISystemTimestamps|null); - - /** Taxonomy activatedPolicyTypes */ - activatedPolicyTypes?: (google.cloud.datacatalog.v1beta1.Taxonomy.PolicyType[]|null); - - /** Taxonomy service */ - service?: (google.cloud.datacatalog.v1beta1.Taxonomy.IService|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 policyTagCount. */ - public policyTagCount: number; - - /** Taxonomy taxonomyTimestamps. */ - public taxonomyTimestamps?: (google.cloud.datacatalog.v1beta1.ISystemTimestamps|null); - - /** Taxonomy activatedPolicyTypes. */ - public activatedPolicyTypes: google.cloud.datacatalog.v1beta1.Taxonomy.PolicyType[]; - - /** Taxonomy service. */ - public service?: (google.cloud.datacatalog.v1beta1.Taxonomy.IService|null); - - /** - * 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 Service. */ - interface IService { - - /** Service name */ - name?: (google.cloud.datacatalog.v1beta1.ManagingSystem|keyof typeof google.cloud.datacatalog.v1beta1.ManagingSystem|null); - - /** Service identity */ - identity?: (string|null); - } - - /** Represents a Service. */ - class Service implements IService { - - /** - * Constructs a new Service. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.Taxonomy.IService); - - /** Service name. */ - public name: (google.cloud.datacatalog.v1beta1.ManagingSystem|keyof typeof google.cloud.datacatalog.v1beta1.ManagingSystem); - - /** Service identity. */ - public identity: string; - - /** - * Creates a new Service instance using the specified properties. - * @param [properties] Properties to set - * @returns Service instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.Taxonomy.IService): google.cloud.datacatalog.v1beta1.Taxonomy.Service; - - /** - * Encodes the specified Service message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Taxonomy.Service.verify|verify} messages. - * @param message Service message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.Taxonomy.IService, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Service message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Taxonomy.Service.verify|verify} messages. - * @param message Service message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.Taxonomy.IService, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Service message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Service - * @throws {Error} If the payload is not a 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.Service; - - /** - * Decodes a Service message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Service - * @throws {Error} If the payload is 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.Service; - - /** - * Verifies a Service message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Service message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Service - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.Taxonomy.Service; - - /** - * Creates a plain object from a Service message. Also converts values to other types if specified. - * @param message Service - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.Taxonomy.Service, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Service to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Service - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** 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); - - /** ListTaxonomiesRequest filter */ - filter?: (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; - - /** ListTaxonomiesRequest filter. */ - public filter: 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); - - /** SerializedTaxonomy activatedPolicyTypes */ - activatedPolicyTypes?: (google.cloud.datacatalog.v1beta1.Taxonomy.PolicyType[]|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[]; - - /** SerializedTaxonomy activatedPolicyTypes. */ - public activatedPolicyTypes: google.cloud.datacatalog.v1beta1.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.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 policyTag */ - policyTag?: (string|null); - - /** 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 policyTag. */ - public policyTag: string; - - /** 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 { - - /** Properties of a Http. */ - interface IHttp { - - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); - - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); - } - - /** Represents a Http. */ - class Http implements IHttp { - - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); - - /** Http rules. */ - public rules: google.api.IHttpRule[]; - - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; - - /** - * Creates a new Http instance using the specified properties. - * @param [properties] Properties to set - * @returns Http instance - */ - public static create(properties?: google.api.IHttp): google.api.Http; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Http message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; - - /** - * Verifies a Http message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Http - */ - public static fromObject(object: { [k: string]: any }): google.api.Http; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Http - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); - - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body */ - body?: (string|null); - - /** HttpRule responseBody */ - responseBody?: (string|null); - - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); - } - - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { - - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get?: (string|null); - - /** HttpRule put. */ - public put?: (string|null); - - /** HttpRule post. */ - public post?: (string|null); - - /** HttpRule delete. */ - public delete?: (string|null); - - /** HttpRule patch. */ - public patch?: (string|null); - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; - - /** HttpRule responseBody. */ - public responseBody: string; - - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; - - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - - /** - * Creates a new HttpRule instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpRule instance - */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; - - /** - * Verifies a HttpRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRule - */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HttpRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { - - /** CustomHttpPattern kind */ - kind?: (string|null); - - /** CustomHttpPattern path */ - path?: (string|null); - } - - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { - - /** - * Constructs a new CustomHttpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICustomHttpPattern); - - /** CustomHttpPattern kind. */ - public kind: string; - - /** CustomHttpPattern path. */ - public path: string; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomHttpPattern instance - */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; - - /** - * Verifies a CustomHttpPattern message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomHttpPattern - */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomHttpPattern to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomHttpPattern - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CommonLanguageSettings. */ - interface ICommonLanguageSettings { - - /** CommonLanguageSettings referenceDocsUri */ - referenceDocsUri?: (string|null); - - /** CommonLanguageSettings destinations */ - destinations?: (google.api.ClientLibraryDestination[]|null); - } - - /** Represents a CommonLanguageSettings. */ - class CommonLanguageSettings implements ICommonLanguageSettings { - - /** - * Constructs a new CommonLanguageSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICommonLanguageSettings); - - /** CommonLanguageSettings referenceDocsUri. */ - public referenceDocsUri: string; - - /** CommonLanguageSettings destinations. */ - public destinations: google.api.ClientLibraryDestination[]; - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CommonLanguageSettings instance - */ - public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; - - /** - * Verifies a CommonLanguageSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommonLanguageSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @param message CommonLanguageSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CommonLanguageSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ClientLibrarySettings. */ - interface IClientLibrarySettings { - - /** ClientLibrarySettings version */ - version?: (string|null); - - /** ClientLibrarySettings launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - - /** ClientLibrarySettings restNumericEnums */ - restNumericEnums?: (boolean|null); - - /** ClientLibrarySettings javaSettings */ - javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings */ - cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings */ - phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings */ - pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings */ - nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings */ - dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings */ - rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings */ - goSettings?: (google.api.IGoSettings|null); - } - - /** Represents a ClientLibrarySettings. */ - class ClientLibrarySettings implements IClientLibrarySettings { - - /** - * Constructs a new ClientLibrarySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IClientLibrarySettings); - - /** ClientLibrarySettings version. */ - public version: string; - - /** ClientLibrarySettings launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - - /** ClientLibrarySettings restNumericEnums. */ - public restNumericEnums: boolean; - - /** ClientLibrarySettings javaSettings. */ - public javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings. */ - public cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings. */ - public phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings. */ - public pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings. */ - public nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings. */ - public dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings. */ - public rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings. */ - public goSettings?: (google.api.IGoSettings|null); - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns ClientLibrarySettings instance - */ - public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; - - /** - * Verifies a ClientLibrarySettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientLibrarySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @param message ClientLibrarySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClientLibrarySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Publishing. */ - interface IPublishing { - - /** Publishing methodSettings */ - methodSettings?: (google.api.IMethodSettings[]|null); - - /** Publishing newIssueUri */ - newIssueUri?: (string|null); - - /** Publishing documentationUri */ - documentationUri?: (string|null); - - /** Publishing apiShortName */ - apiShortName?: (string|null); - - /** Publishing githubLabel */ - githubLabel?: (string|null); - - /** Publishing codeownerGithubTeams */ - codeownerGithubTeams?: (string[]|null); - - /** Publishing docTagPrefix */ - docTagPrefix?: (string|null); - - /** Publishing organization */ - organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); - - /** Publishing librarySettings */ - librarySettings?: (google.api.IClientLibrarySettings[]|null); - - /** Publishing protoReferenceDocumentationUri */ - protoReferenceDocumentationUri?: (string|null); - - /** Publishing restReferenceDocumentationUri */ - restReferenceDocumentationUri?: (string|null); - } - - /** Represents a Publishing. */ - class Publishing implements IPublishing { - - /** - * Constructs a new Publishing. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPublishing); - - /** Publishing methodSettings. */ - public methodSettings: google.api.IMethodSettings[]; - - /** Publishing newIssueUri. */ - public newIssueUri: string; - - /** Publishing documentationUri. */ - public documentationUri: string; - - /** Publishing apiShortName. */ - public apiShortName: string; - - /** Publishing githubLabel. */ - public githubLabel: string; - - /** Publishing codeownerGithubTeams. */ - public codeownerGithubTeams: string[]; - - /** Publishing docTagPrefix. */ - public docTagPrefix: string; - - /** Publishing organization. */ - public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); - - /** Publishing librarySettings. */ - public librarySettings: google.api.IClientLibrarySettings[]; - - /** Publishing protoReferenceDocumentationUri. */ - public protoReferenceDocumentationUri: string; - - /** Publishing restReferenceDocumentationUri. */ - public restReferenceDocumentationUri: string; - - /** - * Creates a new Publishing instance using the specified properties. - * @param [properties] Properties to set - * @returns Publishing instance - */ - public static create(properties?: google.api.IPublishing): google.api.Publishing; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; - - /** - * Verifies a Publishing message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Publishing - */ - public static fromObject(object: { [k: string]: any }): google.api.Publishing; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @param message Publishing - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Publishing to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Publishing - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a JavaSettings. */ - interface IJavaSettings { - - /** JavaSettings libraryPackage */ - libraryPackage?: (string|null); - - /** JavaSettings serviceClassNames */ - serviceClassNames?: ({ [k: string]: string }|null); - - /** JavaSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a JavaSettings. */ - class JavaSettings implements IJavaSettings { - - /** - * Constructs a new JavaSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IJavaSettings); - - /** JavaSettings libraryPackage. */ - public libraryPackage: string; - - /** JavaSettings serviceClassNames. */ - public serviceClassNames: { [k: string]: string }; - - /** JavaSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new JavaSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns JavaSettings instance - */ - public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; - - /** - * Verifies a JavaSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JavaSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @param message JavaSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JavaSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for JavaSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CppSettings. */ - interface ICppSettings { - - /** CppSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a CppSettings. */ - class CppSettings implements ICppSettings { - - /** - * Constructs a new CppSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICppSettings); - - /** CppSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new CppSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CppSettings instance - */ - public static create(properties?: google.api.ICppSettings): google.api.CppSettings; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; - - /** - * Verifies a CppSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CppSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CppSettings; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @param message CppSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CppSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CppSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PhpSettings. */ - interface IPhpSettings { - - /** PhpSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PhpSettings. */ - class PhpSettings implements IPhpSettings { - - /** - * Constructs a new PhpSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPhpSettings); - - /** PhpSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PhpSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PhpSettings instance - */ - public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; - - /** - * Verifies a PhpSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PhpSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @param message PhpSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PhpSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PhpSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PythonSettings. */ - interface IPythonSettings { - - /** PythonSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PythonSettings. */ - class PythonSettings implements IPythonSettings { - - /** - * Constructs a new PythonSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPythonSettings); - - /** PythonSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PythonSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PythonSettings instance - */ - public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; - - /** - * Verifies a PythonSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PythonSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @param message PythonSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PythonSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PythonSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodeSettings. */ - interface INodeSettings { - - /** NodeSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a NodeSettings. */ - class NodeSettings implements INodeSettings { - - /** - * Constructs a new NodeSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.INodeSettings); - - /** NodeSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new NodeSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeSettings instance - */ - public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; - - /** - * Verifies a NodeSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @param message NodeSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DotnetSettings. */ - interface IDotnetSettings { - - /** DotnetSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices */ - renamedServices?: ({ [k: string]: string }|null); - - /** DotnetSettings renamedResources */ - renamedResources?: ({ [k: string]: string }|null); - - /** DotnetSettings ignoredResources */ - ignoredResources?: (string[]|null); - - /** DotnetSettings forcedNamespaceAliases */ - forcedNamespaceAliases?: (string[]|null); - - /** DotnetSettings handwrittenSignatures */ - handwrittenSignatures?: (string[]|null); - } - - /** Represents a DotnetSettings. */ - class DotnetSettings implements IDotnetSettings { - - /** - * Constructs a new DotnetSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IDotnetSettings); - - /** DotnetSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices. */ - public renamedServices: { [k: string]: string }; - - /** DotnetSettings renamedResources. */ - public renamedResources: { [k: string]: string }; - - /** DotnetSettings ignoredResources. */ - public ignoredResources: string[]; - - /** DotnetSettings forcedNamespaceAliases. */ - public forcedNamespaceAliases: string[]; - - /** DotnetSettings handwrittenSignatures. */ - public handwrittenSignatures: string[]; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns DotnetSettings instance - */ - public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; - - /** - * Verifies a DotnetSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DotnetSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @param message DotnetSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DotnetSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DotnetSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RubySettings. */ - interface IRubySettings { - - /** RubySettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a RubySettings. */ - class RubySettings implements IRubySettings { - - /** - * Constructs a new RubySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IRubySettings); - - /** RubySettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new RubySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns RubySettings instance - */ - public static create(properties?: google.api.IRubySettings): google.api.RubySettings; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; - - /** - * Verifies a RubySettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RubySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.RubySettings; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @param message RubySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RubySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RubySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GoSettings. */ - interface IGoSettings { - - /** GoSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a GoSettings. */ - class GoSettings implements IGoSettings { - - /** - * Constructs a new GoSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IGoSettings); - - /** GoSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new GoSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns GoSettings instance - */ - public static create(properties?: google.api.IGoSettings): google.api.GoSettings; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; - - /** - * Verifies a GoSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GoSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.GoSettings; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @param message GoSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GoSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GoSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodSettings. */ - interface IMethodSettings { - - /** MethodSettings selector */ - selector?: (string|null); - - /** MethodSettings longRunning */ - longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields */ - autoPopulatedFields?: (string[]|null); - } - - /** Represents a MethodSettings. */ - class MethodSettings implements IMethodSettings { - - /** - * Constructs a new MethodSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IMethodSettings); - - /** MethodSettings selector. */ - public selector: string; - - /** MethodSettings longRunning. */ - public longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields. */ - public autoPopulatedFields: string[]; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodSettings instance - */ - public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; - - /** - * Verifies a MethodSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @param message MethodSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodSettings { - - /** Properties of a LongRunning. */ - interface ILongRunning { - - /** LongRunning initialPollDelay */ - initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier */ - pollDelayMultiplier?: (number|null); - - /** LongRunning maxPollDelay */ - maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout */ - totalPollTimeout?: (google.protobuf.IDuration|null); - } - - /** Represents a LongRunning. */ - class LongRunning implements ILongRunning { - - /** - * Constructs a new LongRunning. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.MethodSettings.ILongRunning); - - /** LongRunning initialPollDelay. */ - public initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier. */ - public pollDelayMultiplier: number; - - /** LongRunning maxPollDelay. */ - public maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout. */ - public totalPollTimeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new LongRunning instance using the specified properties. - * @param [properties] Properties to set - * @returns LongRunning instance - */ - public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; - - /** - * Verifies a LongRunning message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LongRunning - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @param message LongRunning - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LongRunning to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LongRunning - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** ClientLibraryOrganization enum. */ - enum ClientLibraryOrganization { - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, - CLOUD = 1, - ADS = 2, - PHOTOS = 3, - STREET_VIEW = 4, - SHOPPING = 5, - GEO = 6, - GENERATIVE_AI = 7 - } - - /** ClientLibraryDestination enum. */ - enum ClientLibraryDestination { - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, - GITHUB = 10, - PACKAGE_MANAGER = 20 - } - - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - UNIMPLEMENTED = 6, - PRELAUNCH = 7, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7, - IDENTIFIER = 8 - } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - - /** ResourceDescriptor plural */ - plural?: (string|null); - - /** ResourceDescriptor singular */ - singular?: (string|null); - - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); - } - - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { - - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; - - /** ResourceDescriptor singular. */ - public singular: string; - - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; - - /** - * Verifies a ResourceDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceDescriptor - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); - - /** ResourceReference childType */ - childType?: (string|null); - } - - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { - - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); - - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; - - /** - * Verifies a ResourceReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceReference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { - - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } - - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { - - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); - - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorSet instance - */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; - - /** - * Verifies a FileDescriptorSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Edition enum. */ - enum Edition { - EDITION_UNKNOWN = 0, - EDITION_PROTO2 = 998, - EDITION_PROTO3 = 999, - EDITION_2023 = 1000, - EDITION_2024 = 1001, - EDITION_1_TEST_ONLY = 1, - EDITION_2_TEST_ONLY = 2, - EDITION_99997_TEST_ONLY = 99997, - EDITION_99998_TEST_ONLY = 99998, - EDITION_99999_TEST_ONLY = 99999, - EDITION_MAX = 2147483647 - } - - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { - - /** FileDescriptorProto name */ - name?: (string|null); - - /** FileDescriptorProto package */ - "package"?: (string|null); - - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); - - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); - - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); - - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); - - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax */ - syntax?: (string|null); - - /** FileDescriptorProto edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { - - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** FileDescriptorProto name. */ - public name: string; - - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; - - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; - - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax. */ - public syntax: string; - - /** FileDescriptorProto edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; - - /** - * Verifies a FileDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { - - /** DescriptorProto name */ - name?: (string|null); - - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { - - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; - - /** - * Verifies a DescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DescriptorProto { - - /** Properties of an ExtensionRange. */ - interface IExtensionRange { - - /** ExtensionRange start */ - start?: (number|null); - - /** ExtensionRange end */ - end?: (number|null); - - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } - - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { - - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; - - /** ExtensionRange end. */ - public end: number; - - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Verifies an ExtensionRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReservedRange. */ - interface IReservedRange { - - /** ReservedRange start */ - start?: (number|null); - - /** ReservedRange end */ - end?: (number|null); - } - - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { - - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - - /** ReservedRange start. */ - public start: number; - - /** ReservedRange end. */ - public end: number; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Verifies a ReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { - - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ExtensionRangeOptions declaration */ - declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); - - /** ExtensionRangeOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification */ - verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); - } - - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { - - /** - * Constructs a new ExtensionRangeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); - - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** ExtensionRangeOptions declaration. */ - public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; - - /** ExtensionRangeOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification. */ - public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance - */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; - - /** - * Verifies an ExtensionRangeOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRangeOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ExtensionRangeOptions { - - /** Properties of a Declaration. */ - interface IDeclaration { - - /** Declaration number */ - number?: (number|null); - - /** Declaration fullName */ - fullName?: (string|null); - - /** Declaration type */ - type?: (string|null); - - /** Declaration reserved */ - reserved?: (boolean|null); - - /** Declaration repeated */ - repeated?: (boolean|null); - } - - /** Represents a Declaration. */ - class Declaration implements IDeclaration { - - /** - * Constructs a new Declaration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); - - /** Declaration number. */ - public number: number; - - /** Declaration fullName. */ - public fullName: string; - - /** Declaration type. */ - public type: string; - - /** Declaration reserved. */ - public reserved: boolean; - - /** Declaration repeated. */ - public repeated: boolean; - - /** - * Creates a new Declaration instance using the specified properties. - * @param [properties] Properties to set - * @returns Declaration instance - */ - public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Verifies a Declaration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Declaration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @param message Declaration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Declaration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Declaration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** VerificationState enum. */ - enum VerificationState { - DECLARATION = 0, - UNVERIFIED = 1 - } - } - - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - - /** FieldDescriptorProto name */ - name?: (string|null); - - /** FieldDescriptorProto number */ - number?: (number|null); - - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - - /** FieldDescriptorProto typeName */ - typeName?: (string|null); - - /** FieldDescriptorProto extendee */ - extendee?: (string|null); - - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); - - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); - - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); - - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); - } - - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { - - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); - - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; - - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - - /** FieldDescriptorProto typeName. */ - public typeName: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; - - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; - - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; - - /** FieldDescriptorProto jsonName. */ - public jsonName: string; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; - - /** - * Verifies a FieldDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldDescriptorProto { - - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 - } - - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REPEATED = 3, - LABEL_REQUIRED = 2 - } - } - - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); - - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } - - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { - - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; - - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofDescriptorProto instance - */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - - /** - * Verifies an OneofDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - - /** EnumDescriptorProto name */ - name?: (string|null); - - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { - - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; - - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - - /** - * Verifies an EnumDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EnumDescriptorProto { - - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { - - /** EnumReservedRange start */ - start?: (number|null); - - /** EnumReservedRange end */ - end?: (number|null); - } - - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { - - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - - /** EnumReservedRange start. */ - public start: number; - - /** EnumReservedRange end. */ - public end: number; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Verifies an EnumReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); - - /** EnumValueDescriptorProto number */ - number?: (number|null); - - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } - - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; - - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - - /** - * Verifies an EnumValueDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - - /** ServiceDescriptorProto name */ - name?: (string|null); - - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); - - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } - - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { - - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; - - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - - /** - * Verifies a ServiceDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { - - /** MethodDescriptorProto name */ - name?: (string|null); - - /** MethodDescriptorProto inputType */ - inputType?: (string|null); - - /** MethodDescriptorProto outputType */ - outputType?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); - - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } - - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { - - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); - - /** MethodDescriptorProto name. */ - public name: string; - - /** MethodDescriptorProto inputType. */ - public inputType: string; - - /** MethodDescriptorProto outputType. */ - public outputType: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; - - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; - - /** - * Verifies a MethodDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FileOptions. */ - interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); - - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions goPackage */ - goPackage?: (string|null); - - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); - - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); - - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); - - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); - - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); - - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); - - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); - - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); - - /** FileOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions javaPackage. */ - public javaPackage: string; - - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; - - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; - - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; - - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; - - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); - - /** FileOptions goPackage. */ - public goPackage: string; - - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; - - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; - - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; - - /** FileOptions deprecated. */ - public deprecated: boolean; - - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; - - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; - - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; - - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; - - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; - - /** FileOptions phpNamespace. */ - public phpNamespace: string; - - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; - - /** FileOptions rubyPackage. */ - public rubyPackage: string; - - /** FileOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FileOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FileOptions instance - */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; - - /** - * Verifies a FileOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FileOptions { - - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } - - /** Properties of a MessageOptions. */ - interface IMessageOptions { - - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); - - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); - - /** MessageOptions deprecated */ - deprecated?: (boolean|null); - - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); - - /** MessageOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** MessageOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; - - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions mapEntry. */ - public mapEntry: boolean; - - /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** MessageOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageOptions instance - */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; - - /** - * Verifies a MessageOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MessageOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldOptions. */ - interface IFieldOptions { - - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - - /** FieldOptions packed */ - packed?: (boolean|null); - - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - - /** FieldOptions lazy */ - lazy?: (boolean|null); - - /** FieldOptions unverifiedLazy */ - unverifiedLazy?: (boolean|null); - - /** FieldOptions deprecated */ - deprecated?: (boolean|null); - - /** FieldOptions weak */ - weak?: (boolean|null); - - /** FieldOptions debugRedact */ - debugRedact?: (boolean|null); - - /** FieldOptions retention */ - retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); - - /** FieldOptions targets */ - targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); - - /** FieldOptions editionDefaults */ - editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); - - /** FieldOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - } - - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { - - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); - - /** FieldOptions ctype. */ - public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); - - /** FieldOptions packed. */ - public packed: boolean; - - /** FieldOptions jstype. */ - public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); - - /** FieldOptions lazy. */ - public lazy: boolean; - - /** FieldOptions unverifiedLazy. */ - public unverifiedLazy: boolean; - - /** FieldOptions deprecated. */ - public deprecated: boolean; - - /** FieldOptions weak. */ - public weak: boolean; - - /** FieldOptions debugRedact. */ - public debugRedact: boolean; - - /** FieldOptions retention. */ - public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); - - /** FieldOptions targets. */ - public targets: google.protobuf.FieldOptions.OptionTargetType[]; - - /** FieldOptions editionDefaults. */ - public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; - - /** FieldOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldOptions instance - */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; - - /** - * Verifies a FieldOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldOptions { - - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } - - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 - } - - /** OptionRetention enum. */ - enum OptionRetention { - RETENTION_UNKNOWN = 0, - RETENTION_RUNTIME = 1, - RETENTION_SOURCE = 2 - } - - /** OptionTargetType enum. */ - enum OptionTargetType { - TARGET_TYPE_UNKNOWN = 0, - TARGET_TYPE_FILE = 1, - TARGET_TYPE_EXTENSION_RANGE = 2, - TARGET_TYPE_MESSAGE = 3, - TARGET_TYPE_FIELD = 4, - TARGET_TYPE_ONEOF = 5, - TARGET_TYPE_ENUM = 6, - TARGET_TYPE_ENUM_ENTRY = 7, - TARGET_TYPE_SERVICE = 8, - TARGET_TYPE_METHOD = 9 - } - - /** Properties of an EditionDefault. */ - interface IEditionDefault { - - /** EditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** EditionDefault value */ - value?: (string|null); - } - - /** Represents an EditionDefault. */ - class EditionDefault implements IEditionDefault { - - /** - * Constructs a new EditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); - - /** EditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** EditionDefault value. */ - public value: string; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns EditionDefault instance - */ - public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; - - /** - * Verifies an EditionDefault message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @param message EditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an OneofOptions. */ - interface IOneofOptions { - - /** OneofOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { - - /** - * Constructs a new OneofOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofOptions); - - /** OneofOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofOptions instance - */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; - - /** - * Verifies an OneofOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumOptions. */ - interface IEnumOptions { - - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); - - /** EnumOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** EnumOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { - - /** - * Constructs a new EnumOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumOptions); - - /** EnumOptions allowAlias. */ - public allowAlias: boolean; - - /** EnumOptions deprecated. */ - public deprecated: boolean; - - /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** EnumOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumOptions instance - */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; - - /** - * Verifies an EnumOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { - - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumValueOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact */ - debugRedact?: (boolean|null); - - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { - - /** - * Constructs a new EnumValueOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueOptions); - - /** EnumValueOptions deprecated. */ - public deprecated: boolean; - - /** EnumValueOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact. */ - public debugRedact: boolean; - - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueOptions instance - */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; - - /** - * Verifies an EnumValueOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceOptions. */ - interface IServiceOptions { - - /** ServiceOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); - - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ServiceOptions .google.api.defaultHost */ - ".google.api.defaultHost"?: (string|null); - - /** ServiceOptions .google.api.oauthScopes */ - ".google.api.oauthScopes"?: (string|null); - - /** ServiceOptions .google.api.apiVersion */ - ".google.api.apiVersion"?: (string|null); - } - - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { - - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); - - /** ServiceOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated. */ - public deprecated: boolean; - - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceOptions instance - */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; - - /** - * Verifies a ServiceOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodOptions. */ - interface IMethodOptions { - - /** MethodOptions deprecated */ - deprecated?: (boolean|null); - - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); - - /** MethodOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); - - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); - } - - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { - - /** - * Constructs a new MethodOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodOptions); - - /** MethodOptions deprecated. */ - public deprecated: boolean; - - /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); - - /** MethodOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodOptions instance - */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; - - /** - * Verifies a MethodOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodOptions { - - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 - } - } - - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { - - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); - - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|string|null); - - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|string|null); - - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); - - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|string|null); - - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); - } - - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { - - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); - - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; - - /** UninterpretedOption identifierValue. */ - public identifierValue: string; - - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long|string); - - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long|string); - - /** UninterpretedOption doubleValue. */ - public doubleValue: number; - - /** UninterpretedOption stringValue. */ - public stringValue: (Uint8Array|string); - - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @param [properties] Properties to set - * @returns UninterpretedOption instance - */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; - - /** - * Verifies an UninterpretedOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UninterpretedOption - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UninterpretedOption - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UninterpretedOption { - - /** Properties of a NamePart. */ - interface INamePart { - - /** NamePart namePart */ - namePart: string; - - /** NamePart isExtension */ - isExtension: boolean; - } - - /** Represents a NamePart. */ - class NamePart implements INamePart { - - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - - /** NamePart namePart. */ - public namePart: string; - - /** NamePart isExtension. */ - public isExtension: boolean; - - /** - * Creates a new NamePart instance using the specified properties. - * @param [properties] Properties to set - * @returns NamePart instance - */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; - - /** - * Verifies a NamePart message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamePart - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a FeatureSet. */ - interface IFeatureSet { - - /** FeatureSet fieldPresence */ - fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); - - /** FeatureSet enumType */ - enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); - - /** FeatureSet repeatedFieldEncoding */ - repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); - - /** FeatureSet utf8Validation */ - utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); - - /** FeatureSet messageEncoding */ - messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); - - /** FeatureSet jsonFormat */ - jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); - } - - /** Represents a FeatureSet. */ - class FeatureSet implements IFeatureSet { - - /** - * Constructs a new FeatureSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSet); - - /** FeatureSet fieldPresence. */ - public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); - - /** FeatureSet enumType. */ - public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); - - /** FeatureSet repeatedFieldEncoding. */ - public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); - - /** FeatureSet utf8Validation. */ - public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); - - /** FeatureSet messageEncoding. */ - public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); - - /** FeatureSet jsonFormat. */ - public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); - - /** - * Creates a new FeatureSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSet instance - */ - public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; - - /** - * Verifies a FeatureSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @param message FeatureSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSet { - - /** FieldPresence enum. */ - enum FieldPresence { - FIELD_PRESENCE_UNKNOWN = 0, - EXPLICIT = 1, - IMPLICIT = 2, - LEGACY_REQUIRED = 3 - } - - /** EnumType enum. */ - enum EnumType { - ENUM_TYPE_UNKNOWN = 0, - OPEN = 1, - CLOSED = 2 - } - - /** RepeatedFieldEncoding enum. */ - enum RepeatedFieldEncoding { - REPEATED_FIELD_ENCODING_UNKNOWN = 0, - PACKED = 1, - EXPANDED = 2 - } - - /** Utf8Validation enum. */ - enum Utf8Validation { - UTF8_VALIDATION_UNKNOWN = 0, - VERIFY = 2, - NONE = 3 - } - - /** MessageEncoding enum. */ - enum MessageEncoding { - MESSAGE_ENCODING_UNKNOWN = 0, - LENGTH_PREFIXED = 1, - DELIMITED = 2 - } - - /** JsonFormat enum. */ - enum JsonFormat { - JSON_FORMAT_UNKNOWN = 0, - ALLOW = 1, - LEGACY_BEST_EFFORT = 2 - } - } - - /** Properties of a FeatureSetDefaults. */ - interface IFeatureSetDefaults { - - /** FeatureSetDefaults defaults */ - defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); - - /** FeatureSetDefaults minimumEdition */ - minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetDefaults maximumEdition */ - maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FeatureSetDefaults. */ - class FeatureSetDefaults implements IFeatureSetDefaults { - - /** - * Constructs a new FeatureSetDefaults. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSetDefaults); - - /** FeatureSetDefaults defaults. */ - public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; - - /** FeatureSetDefaults minimumEdition. */ - public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetDefaults maximumEdition. */ - public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetDefaults instance - */ - public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; - - /** - * Verifies a FeatureSetDefaults message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetDefaults - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @param message FeatureSetDefaults - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetDefaults - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSetDefaults { - - /** Properties of a FeatureSetEditionDefault. */ - interface IFeatureSetEditionDefault { - - /** FeatureSetEditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); - } - - /** Represents a FeatureSetEditionDefault. */ - class FeatureSetEditionDefault implements IFeatureSetEditionDefault { - - /** - * Constructs a new FeatureSetEditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); - - /** FeatureSetEditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetEditionDefault instance - */ - public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Verifies a FeatureSetEditionDefault message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetEditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @param message FeatureSetEditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { - - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); - } - - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { - - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); - - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceCodeInfo instance - */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; - - /** - * Verifies a SourceCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SourceCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SourceCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SourceCodeInfo { - - /** Properties of a Location. */ - interface ILocation { - - /** Location path */ - path?: (number[]|null); - - /** Location span */ - span?: (number[]|null); - - /** Location leadingComments */ - leadingComments?: (string|null); - - /** Location trailingComments */ - trailingComments?: (string|null); - - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); - } - - /** Represents a Location. */ - class Location implements ILocation { - - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - - /** Location path. */ - public path: number[]; - - /** Location span. */ - public span: number[]; - - /** Location leadingComments. */ - public leadingComments: string; - - /** Location trailingComments. */ - public trailingComments: string; - - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; - - /** - * Creates a new Location instance using the specified properties. - * @param [properties] Properties to set - * @returns Location instance - */ - public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Location message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; - - /** - * Verifies a Location message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Location - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Location - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { - - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); - } - - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { - - /** - * Constructs a new GeneratedCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); - - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance - */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; - - /** - * Verifies a GeneratedCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GeneratedCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GeneratedCodeInfo { - - /** Properties of an Annotation. */ - interface IAnnotation { - - /** Annotation path */ - path?: (number[]|null); - - /** Annotation sourceFile */ - sourceFile?: (string|null); - - /** Annotation begin */ - begin?: (number|null); - - /** Annotation end */ - end?: (number|null); - - /** Annotation semantic */ - semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); - } - - /** Represents an Annotation. */ - class Annotation implements IAnnotation { - - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - - /** Annotation path. */ - public path: number[]; - - /** Annotation sourceFile. */ - public sourceFile: string; - - /** Annotation begin. */ - public begin: number; - - /** Annotation end. */ - public end: number; - - /** Annotation semantic. */ - public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); - - /** - * Creates a new Annotation instance using the specified properties. - * @param [properties] Properties to set - * @returns Annotation instance - */ - public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Verifies an Annotation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Annotation - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Annotation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Annotation { - - /** Semantic enum. */ - enum Semantic { - NONE = 0, - SET = 1, - ALIAS = 2 - } - } - } - - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|string|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long|string); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; - - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|string|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long|string); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; - - /** - * Verifies a Timestamp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Timestamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/protos.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/protos.js deleted file mode 100644 index 89dd891ba54..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/protos.js +++ /dev/null @@ -1,43311 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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.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; - })(); - - /** - * ManagingSystem enum. - * @name google.cloud.datacatalog.v1beta1.ManagingSystem - * @enum {number} - * @property {number} MANAGING_SYSTEM_UNSPECIFIED=0 MANAGING_SYSTEM_UNSPECIFIED value - * @property {number} MANAGING_SYSTEM_DATAPLEX=1 MANAGING_SYSTEM_DATAPLEX value - * @property {number} MANAGING_SYSTEM_OTHER=2 MANAGING_SYSTEM_OTHER value - */ - v1beta1.ManagingSystem = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MANAGING_SYSTEM_UNSPECIFIED"] = 0; - values[valuesById[1] = "MANAGING_SYSTEM_DATAPLEX"] = 1; - values[valuesById[2] = "MANAGING_SYSTEM_OTHER"] = 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|renameTagTemplateFieldEnumValue}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef RenameTagTemplateFieldEnumValueCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.TagTemplateField} [response] TagTemplateField - */ - - /** - * Calls RenameTagTemplateFieldEnumValue. - * @function renameTagTemplateFieldEnumValue - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldEnumValueRequest} request RenameTagTemplateFieldEnumValueRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.RenameTagTemplateFieldEnumValueRequest, $root.google.cloud.datacatalog.v1beta1.TagTemplateField, request, callback); - }, "name", { value: "RenameTagTemplateFieldEnumValue" }); - - /** - * Calls RenameTagTemplateFieldEnumValue. - * @function renameTagTemplateFieldEnumValue - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldEnumValueRequest} request RenameTagTemplateFieldEnumValueRequest 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 - * @property {Array.|null} [restrictedLocations] Scope restrictedLocations - */ - - /** - * 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 = []; - 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.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; - - /** - * Scope restrictedLocations. - * @member {Array.} restrictedLocations - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @instance - */ - Scope.prototype.restrictedLocations = $util.emptyArray; - - /** - * 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); - 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]); - 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; - } - case 16: { - if (!(message.restrictedLocations && message.restrictedLocations.length)) - message.restrictedLocations = []; - message.restrictedLocations.push(reader.string()); - 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"; - 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"; - } - 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); - if (object.restrictedLocations) { - if (!Array.isArray(object.restrictedLocations)) - throw TypeError(".google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.restrictedLocations: array expected"); - message.restrictedLocations = []; - for (var i = 0; i < object.restrictedLocations.length; ++i) - message.restrictedLocations[i] = String(object.restrictedLocations[i]); - } - 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 = []; - object.restrictedLocations = []; - } - 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; - if (message.restrictedLocations && message.restrictedLocations.length) { - object.restrictedLocations = []; - for (var j = 0; j < message.restrictedLocations.length; ++j) - object.restrictedLocations[j] = message.restrictedLocations[j]; - } - 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 {number|null} [totalSize] SearchCatalogResponse totalSize - * @property {string|null} [nextPageToken] SearchCatalogResponse nextPageToken - * @property {Array.|null} [unreachable] SearchCatalogResponse unreachable - */ - - /** - * 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 = []; - 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.v1beta1.SearchCatalogResponse - * @instance - */ - SearchCatalogResponse.prototype.results = $util.emptyArray; - - /** - * SearchCatalogResponse totalSize. - * @member {number} totalSize - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse - * @instance - */ - SearchCatalogResponse.prototype.totalSize = 0; - - /** - * SearchCatalogResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse - * @instance - */ - SearchCatalogResponse.prototype.nextPageToken = ""; - - /** - * SearchCatalogResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse - * @instance - */ - SearchCatalogResponse.prototype.unreachable = $util.emptyArray; - - /** - * 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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.totalSize); - 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.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 2: { - message.totalSize = reader.int32(); - 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.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.totalSize != null && message.hasOwnProperty("totalSize")) - if (!$util.isInteger(message.totalSize)) - return "totalSize: integer expected"; - 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.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.totalSize != null) - message.totalSize = object.totalSize | 0; - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.datacatalog.v1beta1.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.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 = []; - object.unreachable = []; - } - if (options.defaults) { - object.totalSize = 0; - 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.totalSize != null && message.hasOwnProperty("totalSize")) - object.totalSize = message.totalSize; - 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.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 - * @property {google.cloud.datacatalog.v1beta1.IUsageSignal|null} [usageSignal] Entry usageSignal - */ - - /** - * 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; - - /** - * Entry usageSignal. - * @member {google.cloud.datacatalog.v1beta1.IUsageSignal|null|undefined} usageSignal - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Entry.prototype.usageSignal = 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.usageSignal != null && Object.hasOwnProperty.call(message, "usageSignal")) - $root.google.cloud.datacatalog.v1beta1.UsageSignal.encode(message.usageSignal, writer.uint32(/* id 13, wireType 2 =*/106).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; - } - case 13: { - message.usageSignal = $root.google.cloud.datacatalog.v1beta1.UsageSignal.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; - } - if (message.usageSignal != null && message.hasOwnProperty("usageSignal")) { - var error = $root.google.cloud.datacatalog.v1beta1.UsageSignal.verify(message.usageSignal); - if (error) - return "usageSignal." + 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); - } - if (object.usageSignal != null) { - if (typeof object.usageSignal !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.Entry.usageSignal: object expected"); - message.usageSignal = $root.google.cloud.datacatalog.v1beta1.UsageSignal.fromObject(object.usageSignal); - } - 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 = ""; - object.usageSignal = 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.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.usageSignal != null && message.hasOwnProperty("usageSignal")) - object.usageSignal = $root.google.cloud.datacatalog.v1beta1.UsageSignal.toObject(message.usageSignal, options); - 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.RenameTagTemplateFieldEnumValueRequest = (function() { - - /** - * Properties of a RenameTagTemplateFieldEnumValueRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IRenameTagTemplateFieldEnumValueRequest - * @property {string|null} [name] RenameTagTemplateFieldEnumValueRequest name - * @property {string|null} [newEnumValueDisplayName] RenameTagTemplateFieldEnumValueRequest newEnumValueDisplayName - */ - - /** - * Constructs a new RenameTagTemplateFieldEnumValueRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a RenameTagTemplateFieldEnumValueRequest. - * @implements IRenameTagTemplateFieldEnumValueRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.RenameTagTemplateFieldEnumValueRequest - * @instance - */ - RenameTagTemplateFieldEnumValueRequest.prototype.name = ""; - - /** - * RenameTagTemplateFieldEnumValueRequest newEnumValueDisplayName. - * @member {string} newEnumValueDisplayName - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest - * @instance - */ - RenameTagTemplateFieldEnumValueRequest.prototype.newEnumValueDisplayName = ""; - - /** - * Creates a new RenameTagTemplateFieldEnumValueRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldEnumValueRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest} RenameTagTemplateFieldEnumValueRequest instance - */ - RenameTagTemplateFieldEnumValueRequest.create = function create(properties) { - return new RenameTagTemplateFieldEnumValueRequest(properties); - }; - - /** - * Encodes the specified RenameTagTemplateFieldEnumValueRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.RenameTagTemplateFieldEnumValueRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.RenameTagTemplateFieldEnumValueRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.RenameTagTemplateFieldEnumValueRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest} RenameTagTemplateFieldEnumValueRequest - */ - RenameTagTemplateFieldEnumValueRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.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.v1beta1.RenameTagTemplateFieldEnumValueRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.RenameTagTemplateFieldEnumValueRequest"; - }; - - return RenameTagTemplateFieldEnumValueRequest; - })(); - - 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 - * @property {google.protobuf.ITimestamp|null} [modifyTime] SearchCatalogResult modifyTime - */ - - /** - * 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 = ""; - - /** - * SearchCatalogResult modifyTime. - * @member {google.protobuf.ITimestamp|null|undefined} modifyTime - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult - * @instance - */ - SearchCatalogResult.prototype.modifyTime = null; - - /** - * 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); - 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(); - 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; - } - case 7: { - message.modifyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - 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"; - if (message.modifyTime != null && message.hasOwnProperty("modifyTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.modifyTime); - if (error) - return "modifyTime." + error; - } - 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); - if (object.modifyTime != null) { - if (typeof object.modifyTime !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.SearchCatalogResult.modifyTime: object expected"); - message.modifyTime = $root.google.protobuf.Timestamp.fromObject(object.modifyTime); - } - 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 = ""; - object.modifyTime = null; - } - 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; - if (message.modifyTime != null && message.hasOwnProperty("modifyTime")) - object.modifyTime = $root.google.protobuf.Timestamp.toObject(message.modifyTime, options); - 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: - case 7: - 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; - case "BIGQUERY_MATERIALIZED_VIEW": - case 7: - message.tableSourceType = 7; - 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 - * @property {number} BIGQUERY_MATERIALIZED_VIEW=7 BIGQUERY_MATERIALIZED_VIEW 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; - values[valuesById[7] = "BIGQUERY_MATERIALIZED_VIEW"] = 7; - 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 - * @property {google.cloud.datacatalog.v1beta1.TagTemplate.DataplexTransferStatus|null} [dataplexTransferStatus] TagTemplate dataplexTransferStatus - */ - - /** - * 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; - - /** - * TagTemplate dataplexTransferStatus. - * @member {google.cloud.datacatalog.v1beta1.TagTemplate.DataplexTransferStatus} dataplexTransferStatus - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate - * @instance - */ - TagTemplate.prototype.dataplexTransferStatus = 0; - - /** - * 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(); - } - if (message.dataplexTransferStatus != null && Object.hasOwnProperty.call(message, "dataplexTransferStatus")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.dataplexTransferStatus); - 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; - } - case 7: { - message.dataplexTransferStatus = reader.int32(); - 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; - } - } - if (message.dataplexTransferStatus != null && message.hasOwnProperty("dataplexTransferStatus")) - switch (message.dataplexTransferStatus) { - default: - return "dataplexTransferStatus: enum value expected"; - case 0: - case 1: - break; - } - 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]]); - } - } - switch (object.dataplexTransferStatus) { - default: - if (typeof object.dataplexTransferStatus === "number") { - message.dataplexTransferStatus = object.dataplexTransferStatus; - break; - } - break; - case "DATAPLEX_TRANSFER_STATUS_UNSPECIFIED": - case 0: - message.dataplexTransferStatus = 0; - break; - case "MIGRATED": - case 1: - message.dataplexTransferStatus = 1; - break; - } - 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 = ""; - object.dataplexTransferStatus = options.enums === String ? "DATAPLEX_TRANSFER_STATUS_UNSPECIFIED" : 0; - } - 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); - } - if (message.dataplexTransferStatus != null && message.hasOwnProperty("dataplexTransferStatus")) - object.dataplexTransferStatus = options.enums === String ? $root.google.cloud.datacatalog.v1beta1.TagTemplate.DataplexTransferStatus[message.dataplexTransferStatus] === undefined ? message.dataplexTransferStatus : $root.google.cloud.datacatalog.v1beta1.TagTemplate.DataplexTransferStatus[message.dataplexTransferStatus] : message.dataplexTransferStatus; - 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"; - }; - - /** - * DataplexTransferStatus enum. - * @name google.cloud.datacatalog.v1beta1.TagTemplate.DataplexTransferStatus - * @enum {number} - * @property {number} DATAPLEX_TRANSFER_STATUS_UNSPECIFIED=0 DATAPLEX_TRANSFER_STATUS_UNSPECIFIED value - * @property {number} MIGRATED=1 MIGRATED value - */ - TagTemplate.DataplexTransferStatus = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATAPLEX_TRANSFER_STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "MIGRATED"] = 1; - return values; - })(); - - 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 {string|null} [description] TagTemplateField description - * @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 description. - * @member {string} description - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField - * @instance - */ - TagTemplateField.prototype.description = ""; - - /** - * 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.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.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 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.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.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.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.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.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.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.v1beta1.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.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"; - }; - - /** - * 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; - })(); - - 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; - })(); - - return FieldType; - })(); - - v1beta1.UsageStats = (function() { - - /** - * Properties of a UsageStats. - * @memberof google.cloud.datacatalog.v1beta1 - * @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.v1beta1 - * @classdesc Represents a UsageStats. - * @implements IUsageStats - * @constructor - * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.UsageStats - * @instance - */ - UsageStats.prototype.totalCompletions = 0; - - /** - * UsageStats totalFailures. - * @member {number} totalFailures - * @memberof google.cloud.datacatalog.v1beta1.UsageStats - * @instance - */ - UsageStats.prototype.totalFailures = 0; - - /** - * UsageStats totalCancellations. - * @member {number} totalCancellations - * @memberof google.cloud.datacatalog.v1beta1.UsageStats - * @instance - */ - UsageStats.prototype.totalCancellations = 0; - - /** - * UsageStats totalExecutionTimeForCompletionsMillis. - * @member {number} totalExecutionTimeForCompletionsMillis - * @memberof google.cloud.datacatalog.v1beta1.UsageStats - * @instance - */ - UsageStats.prototype.totalExecutionTimeForCompletionsMillis = 0; - - /** - * Creates a new UsageStats instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.UsageStats - * @static - * @param {google.cloud.datacatalog.v1beta1.IUsageStats=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.UsageStats} UsageStats instance - */ - UsageStats.create = function create(properties) { - return new UsageStats(properties); - }; - - /** - * Encodes the specified UsageStats message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UsageStats.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.UsageStats - * @static - * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.UsageStats.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.UsageStats - * @static - * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.UsageStats - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.UsageStats - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.UsageStats} UsageStats - */ - UsageStats.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.UsageStats) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.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.v1beta1.UsageStats - * @static - * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.UsageStats"; - }; - - return UsageStats; - })(); - - v1beta1.UsageSignal = (function() { - - /** - * Properties of a UsageSignal. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IUsageSignal - * @property {google.protobuf.ITimestamp|null} [updateTime] UsageSignal updateTime - * @property {Object.|null} [usageWithinTimeRange] UsageSignal usageWithinTimeRange - */ - - /** - * Constructs a new UsageSignal. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a UsageSignal. - * @implements IUsageSignal - * @constructor - * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.UsageSignal - * @instance - */ - UsageSignal.prototype.updateTime = null; - - /** - * UsageSignal usageWithinTimeRange. - * @member {Object.} usageWithinTimeRange - * @memberof google.cloud.datacatalog.v1beta1.UsageSignal - * @instance - */ - UsageSignal.prototype.usageWithinTimeRange = $util.emptyObject; - - /** - * Creates a new UsageSignal instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.UsageSignal - * @static - * @param {google.cloud.datacatalog.v1beta1.IUsageSignal=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.UsageSignal} UsageSignal instance - */ - UsageSignal.create = function create(properties) { - return new UsageSignal(properties); - }; - - /** - * Encodes the specified UsageSignal message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UsageSignal.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.UsageSignal - * @static - * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.UsageSignal.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.UsageSignal - * @static - * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.UsageSignal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.UsageSignal - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.UsageSignal} UsageSignal - */ - UsageSignal.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.UsageSignal) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.UsageSignal(); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.UsageSignal.usageWithinTimeRange: object expected"); - message.usageWithinTimeRange[keys[i]] = $root.google.cloud.datacatalog.v1beta1.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.v1beta1.UsageSignal - * @static - * @param {google.cloud.datacatalog.v1beta1.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.v1beta1.UsageStats.toObject(message.usageWithinTimeRange[keys2[j]], options); - } - return object; - }; - - /** - * Converts this UsageSignal to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.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.v1beta1.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.v1beta1.UsageSignal"; - }; - - return UsageSignal; - })(); - - 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 {number|null} [policyTagCount] Taxonomy policyTagCount - * @property {google.cloud.datacatalog.v1beta1.ISystemTimestamps|null} [taxonomyTimestamps] Taxonomy taxonomyTimestamps - * @property {Array.|null} [activatedPolicyTypes] Taxonomy activatedPolicyTypes - * @property {google.cloud.datacatalog.v1beta1.Taxonomy.IService|null} [service] Taxonomy service - */ - - /** - * 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 policyTagCount. - * @member {number} policyTagCount - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy - * @instance - */ - Taxonomy.prototype.policyTagCount = 0; - - /** - * Taxonomy taxonomyTimestamps. - * @member {google.cloud.datacatalog.v1beta1.ISystemTimestamps|null|undefined} taxonomyTimestamps - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy - * @instance - */ - Taxonomy.prototype.taxonomyTimestamps = null; - - /** - * Taxonomy activatedPolicyTypes. - * @member {Array.} activatedPolicyTypes - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy - * @instance - */ - Taxonomy.prototype.activatedPolicyTypes = $util.emptyArray; - - /** - * Taxonomy service. - * @member {google.cloud.datacatalog.v1beta1.Taxonomy.IService|null|undefined} service - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy - * @instance - */ - Taxonomy.prototype.service = null; - - /** - * 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.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.v1beta1.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(); - } - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - $root.google.cloud.datacatalog.v1beta1.Taxonomy.Service.encode(message.service, writer.uint32(/* id 7, wireType 2 =*/58).fork()).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 4: { - message.policyTagCount = reader.int32(); - break; - } - case 5: { - message.taxonomyTimestamps = $root.google.cloud.datacatalog.v1beta1.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; - } - case 7: { - message.service = $root.google.cloud.datacatalog.v1beta1.Taxonomy.Service.decode(reader, reader.uint32()); - 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.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.v1beta1.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; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - var error = $root.google.cloud.datacatalog.v1beta1.Taxonomy.Service.verify(message.service); - if (error) - return "service." + error; - } - 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.policyTagCount != null) - message.policyTagCount = object.policyTagCount | 0; - if (object.taxonomyTimestamps != null) { - if (typeof object.taxonomyTimestamps !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.Taxonomy.taxonomyTimestamps: object expected"); - message.taxonomyTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.fromObject(object.taxonomyTimestamps); - } - 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; - } - } - if (object.service != null) { - if (typeof object.service !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.Taxonomy.service: object expected"); - message.service = $root.google.cloud.datacatalog.v1beta1.Taxonomy.Service.fromObject(object.service); - } - 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 = ""; - object.policyTagCount = 0; - object.taxonomyTimestamps = null; - object.service = 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.v1beta1.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.v1beta1.Taxonomy.PolicyType[message.activatedPolicyTypes[j]] === undefined ? message.activatedPolicyTypes[j] : $root.google.cloud.datacatalog.v1beta1.Taxonomy.PolicyType[message.activatedPolicyTypes[j]] : message.activatedPolicyTypes[j]; - } - if (message.service != null && message.hasOwnProperty("service")) - object.service = $root.google.cloud.datacatalog.v1beta1.Taxonomy.Service.toObject(message.service, options); - 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; - })(); - - Taxonomy.Service = (function() { - - /** - * Properties of a Service. - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy - * @interface IService - * @property {google.cloud.datacatalog.v1beta1.ManagingSystem|null} [name] Service name - * @property {string|null} [identity] Service identity - */ - - /** - * Constructs a new Service. - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy - * @classdesc Represents a Service. - * @implements IService - * @constructor - * @param {google.cloud.datacatalog.v1beta1.Taxonomy.IService=} [properties] Properties to set - */ - function Service(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Service name. - * @member {google.cloud.datacatalog.v1beta1.ManagingSystem} name - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy.Service - * @instance - */ - Service.prototype.name = 0; - - /** - * Service identity. - * @member {string} identity - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy.Service - * @instance - */ - Service.prototype.identity = ""; - - /** - * Creates a new Service instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy.Service - * @static - * @param {google.cloud.datacatalog.v1beta1.Taxonomy.IService=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.Taxonomy.Service} Service instance - */ - Service.create = function create(properties) { - return new Service(properties); - }; - - /** - * Encodes the specified Service message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Taxonomy.Service.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy.Service - * @static - * @param {google.cloud.datacatalog.v1beta1.Taxonomy.IService} message Service message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Service.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.name); - if (message.identity != null && Object.hasOwnProperty.call(message, "identity")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.identity); - return writer; - }; - - /** - * Encodes the specified Service message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Taxonomy.Service.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy.Service - * @static - * @param {google.cloud.datacatalog.v1beta1.Taxonomy.IService} message Service message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Service.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Service message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy.Service - * @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.Service} Service - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Service.decode = function decode(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.Service(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.int32(); - break; - } - case 2: { - message.identity = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Service message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy.Service - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.Taxonomy.Service} Service - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Service.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Service message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy.Service - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Service.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - switch (message.name) { - default: - return "name: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.identity != null && message.hasOwnProperty("identity")) - if (!$util.isString(message.identity)) - return "identity: string expected"; - return null; - }; - - /** - * Creates a Service message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy.Service - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.Taxonomy.Service} Service - */ - Service.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.Taxonomy.Service) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.Taxonomy.Service(); - switch (object.name) { - default: - if (typeof object.name === "number") { - message.name = object.name; - break; - } - break; - case "MANAGING_SYSTEM_UNSPECIFIED": - case 0: - message.name = 0; - break; - case "MANAGING_SYSTEM_DATAPLEX": - case 1: - message.name = 1; - break; - case "MANAGING_SYSTEM_OTHER": - case 2: - message.name = 2; - break; - } - if (object.identity != null) - message.identity = String(object.identity); - return message; - }; - - /** - * Creates a plain object from a Service message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy.Service - * @static - * @param {google.cloud.datacatalog.v1beta1.Taxonomy.Service} message Service - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Service.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = options.enums === String ? "MANAGING_SYSTEM_UNSPECIFIED" : 0; - object.identity = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = options.enums === String ? $root.google.cloud.datacatalog.v1beta1.ManagingSystem[message.name] === undefined ? message.name : $root.google.cloud.datacatalog.v1beta1.ManagingSystem[message.name] : message.name; - if (message.identity != null && message.hasOwnProperty("identity")) - object.identity = message.identity; - return object; - }; - - /** - * Converts this Service to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy.Service - * @instance - * @returns {Object.} JSON object - */ - Service.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Service - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy.Service - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Service.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.Taxonomy.Service"; - }; - - return Service; - })(); - - 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 - * @property {string|null} [filter] ListTaxonomiesRequest filter - */ - - /** - * 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 = ""; - - /** - * ListTaxonomiesRequest filter. - * @member {string} filter - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest - * @instance - */ - ListTaxonomiesRequest.prototype.filter = ""; - - /** - * 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); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - 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; - } - case 4: { - message.filter = 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"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: 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); - if (object.filter != null) - message.filter = String(object.filter); - 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 = ""; - object.filter = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; - - /** - * Converts this 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 - * @property {Array.|null} [activatedPolicyTypes] SerializedTaxonomy activatedPolicyTypes - */ - - /** - * 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 = []; - 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.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; - - /** - * SerializedTaxonomy activatedPolicyTypes. - * @member {Array.} activatedPolicyTypes - * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy - * @instance - */ - SerializedTaxonomy.prototype.activatedPolicyTypes = $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(); - 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.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; - } - 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.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; - } - } - 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.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]); - } - } - if (object.activatedPolicyTypes) { - if (!Array.isArray(object.activatedPolicyTypes)) - throw TypeError(".google.cloud.datacatalog.v1beta1.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.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 = []; - 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.v1beta1.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.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 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} [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.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 policyTag. - * @member {string} policyTag - * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag - * @instance - */ - SerializedPolicyTag.prototype.policyTag = ""; - - /** - * 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.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.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 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.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.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.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.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.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.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.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 = {}; - - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - this.rules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fullyDecodeReservedExpansion = false; - - /** - * Creates a new Http instance using the specified properties. - * @function create - * @memberof google.api.Http - * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance - */ - Http.create = function create(properties) { - return new Http(properties); - }; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); - return writer; - }; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.fullyDecodeReservedExpansion = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; - return null; - }; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - return message; - }; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; - return object; - }; - - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Http - * @function getTypeUrl - * @memberof google.api.Http - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Http"; - }; - - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; - - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; - - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new HttpRule instance using the specified properties. - * @function create - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance - */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); - }; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); - return writer; - }; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.get = reader.string(); - break; - } - case 3: { - message.put = reader.string(); - break; - } - case 4: { - message.post = reader.string(); - break; - } - case 5: { - message["delete"] = reader.string(); - break; - } - case 6: { - message.patch = reader.string(); - break; - } - case 8: { - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - } - case 7: { - message.body = reader.string(); - break; - } - case 12: { - message.responseBody = reader.string(); - break; - } - case 11: { - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; - } - } - return null; - }; - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) - return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.HttpRule - * @static - * @param {google.api.HttpRule} message HttpRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); - } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; - return object; - }; - - /** - * Converts this HttpRule to JSON. - * @function toJSON - * @memberof google.api.HttpRule - * @instance - * @returns {Object.} JSON object - */ - HttpRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HttpRule - * @function getTypeUrl - * @memberof google.api.HttpRule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.HttpRule"; - }; - - return HttpRule; - })(); - - api.CustomHttpPattern = (function() { - - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ - - /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern - * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - */ - function CustomHttpPattern(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @function create - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance - */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); - }; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encode - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - return writer; - }; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.kind = reader.string(); - break; - } - case 2: { - message.path = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomHttpPattern message. - * @function verify - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomHttpPattern.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - return null; - }; - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) - return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); - return message; - }; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomHttpPattern.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; - } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - return object; - }; - - /** - * Converts this CustomHttpPattern to JSON. - * @function toJSON - * @memberof google.api.CustomHttpPattern - * @instance - * @returns {Object.} JSON object - */ - CustomHttpPattern.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomHttpPattern - * @function getTypeUrl - * @memberof google.api.CustomHttpPattern - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CustomHttpPattern"; - }; - - return CustomHttpPattern; - })(); - - api.CommonLanguageSettings = (function() { - - /** - * Properties of a CommonLanguageSettings. - * @memberof google.api - * @interface ICommonLanguageSettings - * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri - * @property {Array.|null} [destinations] CommonLanguageSettings destinations - */ - - /** - * Constructs a new CommonLanguageSettings. - * @memberof google.api - * @classdesc Represents a CommonLanguageSettings. - * @implements ICommonLanguageSettings - * @constructor - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - */ - function CommonLanguageSettings(properties) { - this.destinations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CommonLanguageSettings referenceDocsUri. - * @member {string} referenceDocsUri - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.referenceDocsUri = ""; - - /** - * CommonLanguageSettings destinations. - * @member {Array.} destinations - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.destinations = $util.emptyArray; - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @function create - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance - */ - CommonLanguageSettings.create = function create(properties) { - return new CommonLanguageSettings(properties); - }; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); - if (message.destinations != null && message.destinations.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.destinations.length; ++i) - writer.int32(message.destinations[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.referenceDocsUri = reader.string(); - break; - } - case 2: { - if (!(message.destinations && message.destinations.length)) - message.destinations = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.destinations.push(reader.int32()); - } else - message.destinations.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommonLanguageSettings message. - * @function verify - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommonLanguageSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - if (!$util.isString(message.referenceDocsUri)) - return "referenceDocsUri: string expected"; - if (message.destinations != null && message.hasOwnProperty("destinations")) { - if (!Array.isArray(message.destinations)) - return "destinations: array expected"; - for (var i = 0; i < message.destinations.length; ++i) - switch (message.destinations[i]) { - default: - return "destinations: enum value[] expected"; - case 0: - case 10: - case 20: - break; - } - } - return null; - }; - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - */ - CommonLanguageSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CommonLanguageSettings) - return object; - var message = new $root.google.api.CommonLanguageSettings(); - if (object.referenceDocsUri != null) - message.referenceDocsUri = String(object.referenceDocsUri); - if (object.destinations) { - if (!Array.isArray(object.destinations)) - throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); - message.destinations = []; - for (var i = 0; i < object.destinations.length; ++i) - switch (object.destinations[i]) { - default: - if (typeof object.destinations[i] === "number") { - message.destinations[i] = object.destinations[i]; - break; - } - case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": - case 0: - message.destinations[i] = 0; - break; - case "GITHUB": - case 10: - message.destinations[i] = 10; - break; - case "PACKAGE_MANAGER": - case 20: - message.destinations[i] = 20; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommonLanguageSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.destinations = []; - if (options.defaults) - object.referenceDocsUri = ""; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - object.referenceDocsUri = message.referenceDocsUri; - if (message.destinations && message.destinations.length) { - object.destinations = []; - for (var j = 0; j < message.destinations.length; ++j) - object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; - } - return object; - }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @function toJSON - * @memberof google.api.CommonLanguageSettings - * @instance - * @returns {Object.} JSON object - */ - CommonLanguageSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CommonLanguageSettings - * @function getTypeUrl - * @memberof google.api.CommonLanguageSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CommonLanguageSettings"; - }; - - return CommonLanguageSettings; - })(); - - api.ClientLibrarySettings = (function() { - - /** - * Properties of a ClientLibrarySettings. - * @memberof google.api - * @interface IClientLibrarySettings - * @property {string|null} [version] ClientLibrarySettings version - * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage - * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums - * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings - * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings - * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings - * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings - * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings - * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings - * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings - * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings - */ - - /** - * Constructs a new ClientLibrarySettings. - * @memberof google.api - * @classdesc Represents a ClientLibrarySettings. - * @implements IClientLibrarySettings - * @constructor - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - */ - function ClientLibrarySettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientLibrarySettings version. - * @member {string} version - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.version = ""; - - /** - * ClientLibrarySettings launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.launchStage = 0; - - /** - * ClientLibrarySettings restNumericEnums. - * @member {boolean} restNumericEnums - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.restNumericEnums = false; - - /** - * ClientLibrarySettings javaSettings. - * @member {google.api.IJavaSettings|null|undefined} javaSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.javaSettings = null; - - /** - * ClientLibrarySettings cppSettings. - * @member {google.api.ICppSettings|null|undefined} cppSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.cppSettings = null; - - /** - * ClientLibrarySettings phpSettings. - * @member {google.api.IPhpSettings|null|undefined} phpSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.phpSettings = null; - - /** - * ClientLibrarySettings pythonSettings. - * @member {google.api.IPythonSettings|null|undefined} pythonSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.pythonSettings = null; - - /** - * ClientLibrarySettings nodeSettings. - * @member {google.api.INodeSettings|null|undefined} nodeSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.nodeSettings = null; - - /** - * ClientLibrarySettings dotnetSettings. - * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.dotnetSettings = null; - - /** - * ClientLibrarySettings rubySettings. - * @member {google.api.IRubySettings|null|undefined} rubySettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.rubySettings = null; - - /** - * ClientLibrarySettings goSettings. - * @member {google.api.IGoSettings|null|undefined} goSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.goSettings = null; - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @function create - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance - */ - ClientLibrarySettings.create = function create(properties) { - return new ClientLibrarySettings(properties); - }; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); - if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); - if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) - $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) - $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) - $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) - $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) - $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) - $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) - $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) - $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - case 2: { - message.launchStage = reader.int32(); - break; - } - case 3: { - message.restNumericEnums = reader.bool(); - break; - } - case 21: { - message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); - break; - } - case 22: { - message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); - break; - } - case 23: { - message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); - break; - } - case 24: { - message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); - break; - } - case 25: { - message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); - break; - } - case 26: { - message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); - break; - } - case 27: { - message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); - break; - } - case 28: { - message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientLibrarySettings message. - * @function verify - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientLibrarySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 6: - case 7: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - if (typeof message.restNumericEnums !== "boolean") - return "restNumericEnums: boolean expected"; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { - var error = $root.google.api.JavaSettings.verify(message.javaSettings); - if (error) - return "javaSettings." + error; - } - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { - var error = $root.google.api.CppSettings.verify(message.cppSettings); - if (error) - return "cppSettings." + error; - } - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { - var error = $root.google.api.PhpSettings.verify(message.phpSettings); - if (error) - return "phpSettings." + error; - } - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { - var error = $root.google.api.PythonSettings.verify(message.pythonSettings); - if (error) - return "pythonSettings." + error; - } - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { - var error = $root.google.api.NodeSettings.verify(message.nodeSettings); - if (error) - return "nodeSettings." + error; - } - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { - var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); - if (error) - return "dotnetSettings." + error; - } - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { - var error = $root.google.api.RubySettings.verify(message.rubySettings); - if (error) - return "rubySettings." + error; - } - if (message.goSettings != null && message.hasOwnProperty("goSettings")) { - var error = $root.google.api.GoSettings.verify(message.goSettings); - if (error) - return "goSettings." + error; - } - return null; - }; - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - */ - ClientLibrarySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ClientLibrarySettings) - return object; - var message = new $root.google.api.ClientLibrarySettings(); - if (object.version != null) - message.version = String(object.version); - switch (object.launchStage) { - default: - if (typeof object.launchStage === "number") { - message.launchStage = object.launchStage; - break; - } - break; - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "UNIMPLEMENTED": - case 6: - message.launchStage = 6; - break; - case "PRELAUNCH": - case 7: - message.launchStage = 7; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } - if (object.restNumericEnums != null) - message.restNumericEnums = Boolean(object.restNumericEnums); - if (object.javaSettings != null) { - if (typeof object.javaSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); - message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); - } - if (object.cppSettings != null) { - if (typeof object.cppSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); - message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); - } - if (object.phpSettings != null) { - if (typeof object.phpSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); - message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); - } - if (object.pythonSettings != null) { - if (typeof object.pythonSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); - message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); - } - if (object.nodeSettings != null) { - if (typeof object.nodeSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); - message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); - } - if (object.dotnetSettings != null) { - if (typeof object.dotnetSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); - message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); - } - if (object.rubySettings != null) { - if (typeof object.rubySettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); - message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); - } - if (object.goSettings != null) { - if (typeof object.goSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); - message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); - } - return message; - }; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientLibrarySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = ""; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - object.restNumericEnums = false; - object.javaSettings = null; - object.cppSettings = null; - object.phpSettings = null; - object.pythonSettings = null; - object.nodeSettings = null; - object.dotnetSettings = null; - object.rubySettings = null; - object.goSettings = null; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - object.restNumericEnums = message.restNumericEnums; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) - object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) - object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) - object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) - object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) - object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) - object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) - object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); - if (message.goSettings != null && message.hasOwnProperty("goSettings")) - object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); - return object; - }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @function toJSON - * @memberof google.api.ClientLibrarySettings - * @instance - * @returns {Object.} JSON object - */ - ClientLibrarySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClientLibrarySettings - * @function getTypeUrl - * @memberof google.api.ClientLibrarySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ClientLibrarySettings"; - }; - - return ClientLibrarySettings; - })(); - - api.Publishing = (function() { - - /** - * Properties of a Publishing. - * @memberof google.api - * @interface IPublishing - * @property {Array.|null} [methodSettings] Publishing methodSettings - * @property {string|null} [newIssueUri] Publishing newIssueUri - * @property {string|null} [documentationUri] Publishing documentationUri - * @property {string|null} [apiShortName] Publishing apiShortName - * @property {string|null} [githubLabel] Publishing githubLabel - * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams - * @property {string|null} [docTagPrefix] Publishing docTagPrefix - * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization - * @property {Array.|null} [librarySettings] Publishing librarySettings - * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri - * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri - */ - - /** - * Constructs a new Publishing. - * @memberof google.api - * @classdesc Represents a Publishing. - * @implements IPublishing - * @constructor - * @param {google.api.IPublishing=} [properties] Properties to set - */ - function Publishing(properties) { - this.methodSettings = []; - this.codeownerGithubTeams = []; - this.librarySettings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Publishing methodSettings. - * @member {Array.} methodSettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.methodSettings = $util.emptyArray; - - /** - * Publishing newIssueUri. - * @member {string} newIssueUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.newIssueUri = ""; - - /** - * Publishing documentationUri. - * @member {string} documentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.documentationUri = ""; - - /** - * Publishing apiShortName. - * @member {string} apiShortName - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.apiShortName = ""; - - /** - * Publishing githubLabel. - * @member {string} githubLabel - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.githubLabel = ""; - - /** - * Publishing codeownerGithubTeams. - * @member {Array.} codeownerGithubTeams - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.codeownerGithubTeams = $util.emptyArray; - - /** - * Publishing docTagPrefix. - * @member {string} docTagPrefix - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.docTagPrefix = ""; - - /** - * Publishing organization. - * @member {google.api.ClientLibraryOrganization} organization - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.organization = 0; - - /** - * Publishing librarySettings. - * @member {Array.} librarySettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.librarySettings = $util.emptyArray; - - /** - * Publishing protoReferenceDocumentationUri. - * @member {string} protoReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.protoReferenceDocumentationUri = ""; - - /** - * Publishing restReferenceDocumentationUri. - * @member {string} restReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.restReferenceDocumentationUri = ""; - - /** - * Creates a new Publishing instance using the specified properties. - * @function create - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing=} [properties] Properties to set - * @returns {google.api.Publishing} Publishing instance - */ - Publishing.create = function create(properties) { - return new Publishing(properties); - }; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encode - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.methodSettings != null && message.methodSettings.length) - for (var i = 0; i < message.methodSettings.length; ++i) - $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); - if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); - if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) - writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); - if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) - writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); - if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); - if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) - writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); - if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) - writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); - if (message.librarySettings != null && message.librarySettings.length) - for (var i = 0; i < message.librarySettings.length; ++i) - $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); - if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) - writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); - if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) - writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); - return writer; - }; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @function decode - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.methodSettings && message.methodSettings.length)) - message.methodSettings = []; - message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); - break; - } - case 101: { - message.newIssueUri = reader.string(); - break; - } - case 102: { - message.documentationUri = reader.string(); - break; - } - case 103: { - message.apiShortName = reader.string(); - break; - } - case 104: { - message.githubLabel = reader.string(); - break; - } - case 105: { - if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) - message.codeownerGithubTeams = []; - message.codeownerGithubTeams.push(reader.string()); - break; - } - case 106: { - message.docTagPrefix = reader.string(); - break; - } - case 107: { - message.organization = reader.int32(); - break; - } - case 109: { - if (!(message.librarySettings && message.librarySettings.length)) - message.librarySettings = []; - message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); - break; - } - case 110: { - message.protoReferenceDocumentationUri = reader.string(); - break; - } - case 111: { - message.restReferenceDocumentationUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Publishing message. - * @function verify - * @memberof google.api.Publishing - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Publishing.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { - if (!Array.isArray(message.methodSettings)) - return "methodSettings: array expected"; - for (var i = 0; i < message.methodSettings.length; ++i) { - var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); - if (error) - return "methodSettings." + error; - } - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - if (!$util.isString(message.newIssueUri)) - return "newIssueUri: string expected"; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - if (!$util.isString(message.documentationUri)) - return "documentationUri: string expected"; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - if (!$util.isString(message.apiShortName)) - return "apiShortName: string expected"; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - if (!$util.isString(message.githubLabel)) - return "githubLabel: string expected"; - if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { - if (!Array.isArray(message.codeownerGithubTeams)) - return "codeownerGithubTeams: array expected"; - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - if (!$util.isString(message.codeownerGithubTeams[i])) - return "codeownerGithubTeams: string[] expected"; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - if (!$util.isString(message.docTagPrefix)) - return "docTagPrefix: string expected"; - if (message.organization != null && message.hasOwnProperty("organization")) - switch (message.organization) { - default: - return "organization: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { - if (!Array.isArray(message.librarySettings)) - return "librarySettings: array expected"; - for (var i = 0; i < message.librarySettings.length; ++i) { - var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); - if (error) - return "librarySettings." + error; - } - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - if (!$util.isString(message.protoReferenceDocumentationUri)) - return "protoReferenceDocumentationUri: string expected"; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - if (!$util.isString(message.restReferenceDocumentationUri)) - return "restReferenceDocumentationUri: string expected"; - return null; - }; - - /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Publishing - * @static - * @param {Object.} object Plain object - * @returns {google.api.Publishing} Publishing - */ - Publishing.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Publishing) - return object; - var message = new $root.google.api.Publishing(); - if (object.methodSettings) { - if (!Array.isArray(object.methodSettings)) - throw TypeError(".google.api.Publishing.methodSettings: array expected"); - message.methodSettings = []; - for (var i = 0; i < object.methodSettings.length; ++i) { - if (typeof object.methodSettings[i] !== "object") - throw TypeError(".google.api.Publishing.methodSettings: object expected"); - message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); - } - } - if (object.newIssueUri != null) - message.newIssueUri = String(object.newIssueUri); - if (object.documentationUri != null) - message.documentationUri = String(object.documentationUri); - if (object.apiShortName != null) - message.apiShortName = String(object.apiShortName); - if (object.githubLabel != null) - message.githubLabel = String(object.githubLabel); - if (object.codeownerGithubTeams) { - if (!Array.isArray(object.codeownerGithubTeams)) - throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); - message.codeownerGithubTeams = []; - for (var i = 0; i < object.codeownerGithubTeams.length; ++i) - message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); - } - if (object.docTagPrefix != null) - message.docTagPrefix = String(object.docTagPrefix); - switch (object.organization) { - default: - if (typeof object.organization === "number") { - message.organization = object.organization; - break; - } - break; - case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": - case 0: - message.organization = 0; - break; - case "CLOUD": - case 1: - message.organization = 1; - break; - case "ADS": - case 2: - message.organization = 2; - break; - case "PHOTOS": - case 3: - message.organization = 3; - break; - case "STREET_VIEW": - case 4: - message.organization = 4; - break; - case "SHOPPING": - case 5: - message.organization = 5; - break; - case "GEO": - case 6: - message.organization = 6; - break; - case "GENERATIVE_AI": - case 7: - message.organization = 7; - break; - } - if (object.librarySettings) { - if (!Array.isArray(object.librarySettings)) - throw TypeError(".google.api.Publishing.librarySettings: array expected"); - message.librarySettings = []; - for (var i = 0; i < object.librarySettings.length; ++i) { - if (typeof object.librarySettings[i] !== "object") - throw TypeError(".google.api.Publishing.librarySettings: object expected"); - message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); - } - } - if (object.protoReferenceDocumentationUri != null) - message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); - if (object.restReferenceDocumentationUri != null) - message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); - return message; - }; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Publishing - * @static - * @param {google.api.Publishing} message Publishing - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Publishing.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.methodSettings = []; - object.codeownerGithubTeams = []; - object.librarySettings = []; - } - if (options.defaults) { - object.newIssueUri = ""; - object.documentationUri = ""; - object.apiShortName = ""; - object.githubLabel = ""; - object.docTagPrefix = ""; - object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; - object.protoReferenceDocumentationUri = ""; - object.restReferenceDocumentationUri = ""; - } - if (message.methodSettings && message.methodSettings.length) { - object.methodSettings = []; - for (var j = 0; j < message.methodSettings.length; ++j) - object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - object.newIssueUri = message.newIssueUri; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - object.documentationUri = message.documentationUri; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - object.apiShortName = message.apiShortName; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - object.githubLabel = message.githubLabel; - if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { - object.codeownerGithubTeams = []; - for (var j = 0; j < message.codeownerGithubTeams.length; ++j) - object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - object.docTagPrefix = message.docTagPrefix; - if (message.organization != null && message.hasOwnProperty("organization")) - object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; - if (message.librarySettings && message.librarySettings.length) { - object.librarySettings = []; - for (var j = 0; j < message.librarySettings.length; ++j) - object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; - return object; - }; - - /** - * Converts this Publishing to JSON. - * @function toJSON - * @memberof google.api.Publishing - * @instance - * @returns {Object.} JSON object - */ - Publishing.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Publishing - * @function getTypeUrl - * @memberof google.api.Publishing - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Publishing"; - }; - - return Publishing; - })(); - - api.JavaSettings = (function() { - - /** - * Properties of a JavaSettings. - * @memberof google.api - * @interface IJavaSettings - * @property {string|null} [libraryPackage] JavaSettings libraryPackage - * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames - * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common - */ - - /** - * Constructs a new JavaSettings. - * @memberof google.api - * @classdesc Represents a JavaSettings. - * @implements IJavaSettings - * @constructor - * @param {google.api.IJavaSettings=} [properties] Properties to set - */ - function JavaSettings(properties) { - this.serviceClassNames = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * JavaSettings libraryPackage. - * @member {string} libraryPackage - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.libraryPackage = ""; - - /** - * JavaSettings serviceClassNames. - * @member {Object.} serviceClassNames - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.serviceClassNames = $util.emptyObject; - - /** - * JavaSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.common = null; - - /** - * Creates a new JavaSettings instance using the specified properties. - * @function create - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings=} [properties] Properties to set - * @returns {google.api.JavaSettings} JavaSettings instance - */ - JavaSettings.create = function create(properties) { - return new JavaSettings(properties); - }; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encode - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); - if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) - for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.libraryPackage = reader.string(); - break; - } - case 2: { - if (message.serviceClassNames === $util.emptyObject) - message.serviceClassNames = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.serviceClassNames[key] = value; - break; - } - case 3: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JavaSettings message. - * @function verify - * @memberof google.api.JavaSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JavaSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - if (!$util.isString(message.libraryPackage)) - return "libraryPackage: string expected"; - if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { - if (!$util.isObject(message.serviceClassNames)) - return "serviceClassNames: object expected"; - var key = Object.keys(message.serviceClassNames); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.serviceClassNames[key[i]])) - return "serviceClassNames: string{k:string} expected"; - } - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.JavaSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.JavaSettings} JavaSettings - */ - JavaSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.JavaSettings) - return object; - var message = new $root.google.api.JavaSettings(); - if (object.libraryPackage != null) - message.libraryPackage = String(object.libraryPackage); - if (object.serviceClassNames) { - if (typeof object.serviceClassNames !== "object") - throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); - message.serviceClassNames = {}; - for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) - message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); - } - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.JavaSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.JavaSettings - * @static - * @param {google.api.JavaSettings} message JavaSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JavaSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.serviceClassNames = {}; - if (options.defaults) { - object.libraryPackage = ""; - object.common = null; - } - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - object.libraryPackage = message.libraryPackage; - var keys2; - if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { - object.serviceClassNames = {}; - for (var j = 0; j < keys2.length; ++j) - object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; - } - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this JavaSettings to JSON. - * @function toJSON - * @memberof google.api.JavaSettings - * @instance - * @returns {Object.} JSON object - */ - JavaSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for JavaSettings - * @function getTypeUrl - * @memberof google.api.JavaSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.JavaSettings"; - }; - - return JavaSettings; - })(); - - api.CppSettings = (function() { - - /** - * Properties of a CppSettings. - * @memberof google.api - * @interface ICppSettings - * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common - */ - - /** - * Constructs a new CppSettings. - * @memberof google.api - * @classdesc Represents a CppSettings. - * @implements ICppSettings - * @constructor - * @param {google.api.ICppSettings=} [properties] Properties to set - */ - function CppSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CppSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.CppSettings - * @instance - */ - CppSettings.prototype.common = null; - - /** - * Creates a new CppSettings instance using the specified properties. - * @function create - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings=} [properties] Properties to set - * @returns {google.api.CppSettings} CppSettings instance - */ - CppSettings.create = function create(properties) { - return new CppSettings(properties); - }; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CppSettings message. - * @function verify - * @memberof google.api.CppSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CppSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CppSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CppSettings} CppSettings - */ - CppSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CppSettings) - return object; - var message = new $root.google.api.CppSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.CppSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CppSettings - * @static - * @param {google.api.CppSettings} message CppSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CppSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this CppSettings to JSON. - * @function toJSON - * @memberof google.api.CppSettings - * @instance - * @returns {Object.} JSON object - */ - CppSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CppSettings - * @function getTypeUrl - * @memberof google.api.CppSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CppSettings"; - }; - - return CppSettings; - })(); - - api.PhpSettings = (function() { - - /** - * Properties of a PhpSettings. - * @memberof google.api - * @interface IPhpSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common - */ - - /** - * Constructs a new PhpSettings. - * @memberof google.api - * @classdesc Represents a PhpSettings. - * @implements IPhpSettings - * @constructor - * @param {google.api.IPhpSettings=} [properties] Properties to set - */ - function PhpSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PhpSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PhpSettings - * @instance - */ - PhpSettings.prototype.common = null; - - /** - * Creates a new PhpSettings instance using the specified properties. - * @function create - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings=} [properties] Properties to set - * @returns {google.api.PhpSettings} PhpSettings instance - */ - PhpSettings.create = function create(properties) { - return new PhpSettings(properties); - }; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PhpSettings message. - * @function verify - * @memberof google.api.PhpSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PhpSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PhpSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PhpSettings} PhpSettings - */ - PhpSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PhpSettings) - return object; - var message = new $root.google.api.PhpSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PhpSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PhpSettings - * @static - * @param {google.api.PhpSettings} message PhpSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PhpSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this PhpSettings to JSON. - * @function toJSON - * @memberof google.api.PhpSettings - * @instance - * @returns {Object.} JSON object - */ - PhpSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PhpSettings - * @function getTypeUrl - * @memberof google.api.PhpSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PhpSettings"; - }; - - return PhpSettings; - })(); - - api.PythonSettings = (function() { - - /** - * Properties of a PythonSettings. - * @memberof google.api - * @interface IPythonSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common - */ - - /** - * Constructs a new PythonSettings. - * @memberof google.api - * @classdesc Represents a PythonSettings. - * @implements IPythonSettings - * @constructor - * @param {google.api.IPythonSettings=} [properties] Properties to set - */ - function PythonSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PythonSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PythonSettings - * @instance - */ - PythonSettings.prototype.common = null; - - /** - * Creates a new PythonSettings instance using the specified properties. - * @function create - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings=} [properties] Properties to set - * @returns {google.api.PythonSettings} PythonSettings instance - */ - PythonSettings.create = function create(properties) { - return new PythonSettings(properties); - }; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PythonSettings message. - * @function verify - * @memberof google.api.PythonSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PythonSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PythonSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PythonSettings} PythonSettings - */ - PythonSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PythonSettings) - return object; - var message = new $root.google.api.PythonSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PythonSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PythonSettings - * @static - * @param {google.api.PythonSettings} message PythonSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PythonSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this PythonSettings to JSON. - * @function toJSON - * @memberof google.api.PythonSettings - * @instance - * @returns {Object.} JSON object - */ - PythonSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PythonSettings - * @function getTypeUrl - * @memberof google.api.PythonSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PythonSettings"; - }; - - return PythonSettings; - })(); - - api.NodeSettings = (function() { - - /** - * Properties of a NodeSettings. - * @memberof google.api - * @interface INodeSettings - * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common - */ - - /** - * Constructs a new NodeSettings. - * @memberof google.api - * @classdesc Represents a NodeSettings. - * @implements INodeSettings - * @constructor - * @param {google.api.INodeSettings=} [properties] Properties to set - */ - function NodeSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.NodeSettings - * @instance - */ - NodeSettings.prototype.common = null; - - /** - * Creates a new NodeSettings instance using the specified properties. - * @function create - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings=} [properties] Properties to set - * @returns {google.api.NodeSettings} NodeSettings instance - */ - NodeSettings.create = function create(properties) { - return new NodeSettings(properties); - }; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encode - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeSettings message. - * @function verify - * @memberof google.api.NodeSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.NodeSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.NodeSettings} NodeSettings - */ - NodeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.NodeSettings) - return object; - var message = new $root.google.api.NodeSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.NodeSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.NodeSettings - * @static - * @param {google.api.NodeSettings} message NodeSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this NodeSettings to JSON. - * @function toJSON - * @memberof google.api.NodeSettings - * @instance - * @returns {Object.} JSON object - */ - NodeSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeSettings - * @function getTypeUrl - * @memberof google.api.NodeSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.NodeSettings"; - }; - - return NodeSettings; - })(); - - api.DotnetSettings = (function() { - - /** - * Properties of a DotnetSettings. - * @memberof google.api - * @interface IDotnetSettings - * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common - * @property {Object.|null} [renamedServices] DotnetSettings renamedServices - * @property {Object.|null} [renamedResources] DotnetSettings renamedResources - * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources - * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases - * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures - */ - - /** - * Constructs a new DotnetSettings. - * @memberof google.api - * @classdesc Represents a DotnetSettings. - * @implements IDotnetSettings - * @constructor - * @param {google.api.IDotnetSettings=} [properties] Properties to set - */ - function DotnetSettings(properties) { - this.renamedServices = {}; - this.renamedResources = {}; - this.ignoredResources = []; - this.forcedNamespaceAliases = []; - this.handwrittenSignatures = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DotnetSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.common = null; - - /** - * DotnetSettings renamedServices. - * @member {Object.} renamedServices - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedServices = $util.emptyObject; - - /** - * DotnetSettings renamedResources. - * @member {Object.} renamedResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedResources = $util.emptyObject; - - /** - * DotnetSettings ignoredResources. - * @member {Array.} ignoredResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.ignoredResources = $util.emptyArray; - - /** - * DotnetSettings forcedNamespaceAliases. - * @member {Array.} forcedNamespaceAliases - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; - - /** - * DotnetSettings handwrittenSignatures. - * @member {Array.} handwrittenSignatures - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @function create - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings=} [properties] Properties to set - * @returns {google.api.DotnetSettings} DotnetSettings instance - */ - DotnetSettings.create = function create(properties) { - return new DotnetSettings(properties); - }; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encode - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) - for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); - if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) - for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); - if (message.ignoredResources != null && message.ignoredResources.length) - for (var i = 0; i < message.ignoredResources.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); - if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); - if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); - return writer; - }; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - case 2: { - if (message.renamedServices === $util.emptyObject) - message.renamedServices = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.renamedServices[key] = value; - break; - } - case 3: { - if (message.renamedResources === $util.emptyObject) - message.renamedResources = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.renamedResources[key] = value; - break; - } - case 4: { - if (!(message.ignoredResources && message.ignoredResources.length)) - message.ignoredResources = []; - message.ignoredResources.push(reader.string()); - break; - } - case 5: { - if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) - message.forcedNamespaceAliases = []; - message.forcedNamespaceAliases.push(reader.string()); - break; - } - case 6: { - if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) - message.handwrittenSignatures = []; - message.handwrittenSignatures.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DotnetSettings message. - * @function verify - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DotnetSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { - if (!$util.isObject(message.renamedServices)) - return "renamedServices: object expected"; - var key = Object.keys(message.renamedServices); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedServices[key[i]])) - return "renamedServices: string{k:string} expected"; - } - if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { - if (!$util.isObject(message.renamedResources)) - return "renamedResources: object expected"; - var key = Object.keys(message.renamedResources); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedResources[key[i]])) - return "renamedResources: string{k:string} expected"; - } - if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { - if (!Array.isArray(message.ignoredResources)) - return "ignoredResources: array expected"; - for (var i = 0; i < message.ignoredResources.length; ++i) - if (!$util.isString(message.ignoredResources[i])) - return "ignoredResources: string[] expected"; - } - if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { - if (!Array.isArray(message.forcedNamespaceAliases)) - return "forcedNamespaceAliases: array expected"; - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - if (!$util.isString(message.forcedNamespaceAliases[i])) - return "forcedNamespaceAliases: string[] expected"; - } - if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { - if (!Array.isArray(message.handwrittenSignatures)) - return "handwrittenSignatures: array expected"; - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - if (!$util.isString(message.handwrittenSignatures[i])) - return "handwrittenSignatures: string[] expected"; - } - return null; - }; - - /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.DotnetSettings} DotnetSettings - */ - DotnetSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.DotnetSettings) - return object; - var message = new $root.google.api.DotnetSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.DotnetSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - if (object.renamedServices) { - if (typeof object.renamedServices !== "object") - throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); - message.renamedServices = {}; - for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) - message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); - } - if (object.renamedResources) { - if (typeof object.renamedResources !== "object") - throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); - message.renamedResources = {}; - for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) - message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); - } - if (object.ignoredResources) { - if (!Array.isArray(object.ignoredResources)) - throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); - message.ignoredResources = []; - for (var i = 0; i < object.ignoredResources.length; ++i) - message.ignoredResources[i] = String(object.ignoredResources[i]); - } - if (object.forcedNamespaceAliases) { - if (!Array.isArray(object.forcedNamespaceAliases)) - throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); - message.forcedNamespaceAliases = []; - for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) - message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); - } - if (object.handwrittenSignatures) { - if (!Array.isArray(object.handwrittenSignatures)) - throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); - message.handwrittenSignatures = []; - for (var i = 0; i < object.handwrittenSignatures.length; ++i) - message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); - } - return message; - }; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.DotnetSettings} message DotnetSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DotnetSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.ignoredResources = []; - object.forcedNamespaceAliases = []; - object.handwrittenSignatures = []; - } - if (options.objects || options.defaults) { - object.renamedServices = {}; - object.renamedResources = {}; - } - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - var keys2; - if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { - object.renamedServices = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; - } - if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { - object.renamedResources = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; - } - if (message.ignoredResources && message.ignoredResources.length) { - object.ignoredResources = []; - for (var j = 0; j < message.ignoredResources.length; ++j) - object.ignoredResources[j] = message.ignoredResources[j]; - } - if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { - object.forcedNamespaceAliases = []; - for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) - object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; - } - if (message.handwrittenSignatures && message.handwrittenSignatures.length) { - object.handwrittenSignatures = []; - for (var j = 0; j < message.handwrittenSignatures.length; ++j) - object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; - } - return object; - }; - - /** - * Converts this DotnetSettings to JSON. - * @function toJSON - * @memberof google.api.DotnetSettings - * @instance - * @returns {Object.} JSON object - */ - DotnetSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DotnetSettings - * @function getTypeUrl - * @memberof google.api.DotnetSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.DotnetSettings"; - }; - - return DotnetSettings; - })(); - - api.RubySettings = (function() { - - /** - * Properties of a RubySettings. - * @memberof google.api - * @interface IRubySettings - * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common - */ - - /** - * Constructs a new RubySettings. - * @memberof google.api - * @classdesc Represents a RubySettings. - * @implements IRubySettings - * @constructor - * @param {google.api.IRubySettings=} [properties] Properties to set - */ - function RubySettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RubySettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.RubySettings - * @instance - */ - RubySettings.prototype.common = null; - - /** - * Creates a new RubySettings instance using the specified properties. - * @function create - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings=} [properties] Properties to set - * @returns {google.api.RubySettings} RubySettings instance - */ - RubySettings.create = function create(properties) { - return new RubySettings(properties); - }; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encode - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RubySettings message. - * @function verify - * @memberof google.api.RubySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RubySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.RubySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.RubySettings} RubySettings - */ - RubySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.RubySettings) - return object; - var message = new $root.google.api.RubySettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.RubySettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.RubySettings - * @static - * @param {google.api.RubySettings} message RubySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RubySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this RubySettings to JSON. - * @function toJSON - * @memberof google.api.RubySettings - * @instance - * @returns {Object.} JSON object - */ - RubySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RubySettings - * @function getTypeUrl - * @memberof google.api.RubySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.RubySettings"; - }; - - return RubySettings; - })(); - - api.GoSettings = (function() { - - /** - * Properties of a GoSettings. - * @memberof google.api - * @interface IGoSettings - * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common - */ - - /** - * Constructs a new GoSettings. - * @memberof google.api - * @classdesc Represents a GoSettings. - * @implements IGoSettings - * @constructor - * @param {google.api.IGoSettings=} [properties] Properties to set - */ - function GoSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GoSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.GoSettings - * @instance - */ - GoSettings.prototype.common = null; - - /** - * Creates a new GoSettings instance using the specified properties. - * @function create - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings=} [properties] Properties to set - * @returns {google.api.GoSettings} GoSettings instance - */ - GoSettings.create = function create(properties) { - return new GoSettings(properties); - }; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encode - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GoSettings message. - * @function verify - * @memberof google.api.GoSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GoSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.GoSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.GoSettings} GoSettings - */ - GoSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.GoSettings) - return object; - var message = new $root.google.api.GoSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.GoSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.GoSettings - * @static - * @param {google.api.GoSettings} message GoSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GoSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this GoSettings to JSON. - * @function toJSON - * @memberof google.api.GoSettings - * @instance - * @returns {Object.} JSON object - */ - GoSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GoSettings - * @function getTypeUrl - * @memberof google.api.GoSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.GoSettings"; - }; - - return GoSettings; - })(); - - api.MethodSettings = (function() { - - /** - * Properties of a MethodSettings. - * @memberof google.api - * @interface IMethodSettings - * @property {string|null} [selector] MethodSettings selector - * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning - * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields - */ - - /** - * Constructs a new MethodSettings. - * @memberof google.api - * @classdesc Represents a MethodSettings. - * @implements IMethodSettings - * @constructor - * @param {google.api.IMethodSettings=} [properties] Properties to set - */ - function MethodSettings(properties) { - this.autoPopulatedFields = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodSettings selector. - * @member {string} selector - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.selector = ""; - - /** - * MethodSettings longRunning. - * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.longRunning = null; - - /** - * MethodSettings autoPopulatedFields. - * @member {Array.} autoPopulatedFields - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings=} [properties] Properties to set - * @returns {google.api.MethodSettings} MethodSettings instance - */ - MethodSettings.create = function create(properties) { - return new MethodSettings(properties); - }; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) - $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); - return writer; - }; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); - break; - } - case 3: { - if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) - message.autoPopulatedFields = []; - message.autoPopulatedFields.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodSettings message. - * @function verify - * @memberof google.api.MethodSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) { - var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); - if (error) - return "longRunning." + error; - } - if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { - if (!Array.isArray(message.autoPopulatedFields)) - return "autoPopulatedFields: array expected"; - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - if (!$util.isString(message.autoPopulatedFields[i])) - return "autoPopulatedFields: string[] expected"; - } - return null; - }; - - /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings} MethodSettings - */ - MethodSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings) - return object; - var message = new $root.google.api.MethodSettings(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.longRunning != null) { - if (typeof object.longRunning !== "object") - throw TypeError(".google.api.MethodSettings.longRunning: object expected"); - message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); - } - if (object.autoPopulatedFields) { - if (!Array.isArray(object.autoPopulatedFields)) - throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); - message.autoPopulatedFields = []; - for (var i = 0; i < object.autoPopulatedFields.length; ++i) - message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); - } - return message; - }; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings - * @static - * @param {google.api.MethodSettings} message MethodSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.autoPopulatedFields = []; - if (options.defaults) { - object.selector = ""; - object.longRunning = null; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) - object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); - if (message.autoPopulatedFields && message.autoPopulatedFields.length) { - object.autoPopulatedFields = []; - for (var j = 0; j < message.autoPopulatedFields.length; ++j) - object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; - } - return object; - }; - - /** - * Converts this MethodSettings to JSON. - * @function toJSON - * @memberof google.api.MethodSettings - * @instance - * @returns {Object.} JSON object - */ - MethodSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodSettings - * @function getTypeUrl - * @memberof google.api.MethodSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings"; - }; - - MethodSettings.LongRunning = (function() { - - /** - * Properties of a LongRunning. - * @memberof google.api.MethodSettings - * @interface ILongRunning - * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay - * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier - * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay - * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout - */ - - /** - * Constructs a new LongRunning. - * @memberof google.api.MethodSettings - * @classdesc Represents a LongRunning. - * @implements ILongRunning - * @constructor - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - */ - function LongRunning(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LongRunning initialPollDelay. - * @member {google.protobuf.IDuration|null|undefined} initialPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.initialPollDelay = null; - - /** - * LongRunning pollDelayMultiplier. - * @member {number} pollDelayMultiplier - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.pollDelayMultiplier = 0; - - /** - * LongRunning maxPollDelay. - * @member {google.protobuf.IDuration|null|undefined} maxPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.maxPollDelay = null; - - /** - * LongRunning totalPollTimeout. - * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.totalPollTimeout = null; - - /** - * Creates a new LongRunning instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - * @returns {google.api.MethodSettings.LongRunning} LongRunning instance - */ - LongRunning.create = function create(properties) { - return new LongRunning(properties); - }; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) - $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); - if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) - $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) - $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 2: { - message.pollDelayMultiplier = reader.float(); - break; - } - case 3: { - message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 4: { - message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LongRunning message. - * @function verify - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LongRunning.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); - if (error) - return "initialPollDelay." + error; - } - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - if (typeof message.pollDelayMultiplier !== "number") - return "pollDelayMultiplier: number expected"; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); - if (error) - return "maxPollDelay." + error; - } - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { - var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); - if (error) - return "totalPollTimeout." + error; - } - return null; - }; - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings.LongRunning} LongRunning - */ - LongRunning.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings.LongRunning) - return object; - var message = new $root.google.api.MethodSettings.LongRunning(); - if (object.initialPollDelay != null) { - if (typeof object.initialPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); - message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); - } - if (object.pollDelayMultiplier != null) - message.pollDelayMultiplier = Number(object.pollDelayMultiplier); - if (object.maxPollDelay != null) { - if (typeof object.maxPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); - message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); - } - if (object.totalPollTimeout != null) { - if (typeof object.totalPollTimeout !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); - message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); - } - return message; - }; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.LongRunning} message LongRunning - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LongRunning.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.initialPollDelay = null; - object.pollDelayMultiplier = 0; - object.maxPollDelay = null; - object.totalPollTimeout = null; - } - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) - object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) - object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) - object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); - return object; - }; - - /** - * Converts this LongRunning to JSON. - * @function toJSON - * @memberof google.api.MethodSettings.LongRunning - * @instance - * @returns {Object.} JSON object - */ - LongRunning.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LongRunning - * @function getTypeUrl - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; - }; - - return LongRunning; - })(); - - return MethodSettings; - })(); - - /** - * ClientLibraryOrganization enum. - * @name google.api.ClientLibraryOrganization - * @enum {number} - * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value - * @property {number} CLOUD=1 CLOUD value - * @property {number} ADS=2 ADS value - * @property {number} PHOTOS=3 PHOTOS value - * @property {number} STREET_VIEW=4 STREET_VIEW value - * @property {number} SHOPPING=5 SHOPPING value - * @property {number} GEO=6 GEO value - * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value - */ - api.ClientLibraryOrganization = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD"] = 1; - values[valuesById[2] = "ADS"] = 2; - values[valuesById[3] = "PHOTOS"] = 3; - values[valuesById[4] = "STREET_VIEW"] = 4; - values[valuesById[5] = "SHOPPING"] = 5; - values[valuesById[6] = "GEO"] = 6; - values[valuesById[7] = "GENERATIVE_AI"] = 7; - return values; - })(); - - /** - * ClientLibraryDestination enum. - * @name google.api.ClientLibraryDestination - * @enum {number} - * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value - * @property {number} GITHUB=10 GITHUB value - * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value - */ - api.ClientLibraryDestination = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; - values[valuesById[10] = "GITHUB"] = 10; - values[valuesById[20] = "PACKAGE_MANAGER"] = 20; - return values; - })(); - - /** - * LaunchStage enum. - * @name google.api.LaunchStage - * @enum {number} - * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value - * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value - * @property {number} PRELAUNCH=7 PRELAUNCH value - * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value - * @property {number} ALPHA=2 ALPHA value - * @property {number} BETA=3 BETA value - * @property {number} GA=4 GA value - * @property {number} DEPRECATED=5 DEPRECATED value - */ - api.LaunchStage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; - values[valuesById[6] = "UNIMPLEMENTED"] = 6; - values[valuesById[7] = "PRELAUNCH"] = 7; - values[valuesById[1] = "EARLY_ACCESS"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "BETA"] = 3; - values[valuesById[4] = "GA"] = 4; - values[valuesById[5] = "DEPRECATED"] = 5; - return values; - })(); - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - * @property {number} IDENTIFIER=8 IDENTIFIER value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - values[valuesById[8] = "IDENTIFIER"] = 8; - return values; - })(); - - api.ResourceDescriptor = (function() { - - /** - * Properties of a ResourceDescriptor. - * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style - */ - - /** - * Constructs a new ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor - * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; - - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; - - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; - - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; - - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; - - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.singular = ""; - - /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.style = $util.emptyArray; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @function create - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance - */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); - }; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - } - case 3: { - message.nameField = reader.string(); - break; - } - case 4: { - message.history = reader.int32(); - break; - } - case 5: { - message.plural = reader.string(); - break; - } - case 6: { - message.singular = reader.string(); - break; - } - case 10: { - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceDescriptor message. - * @function verify - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } - } - return null; - }; - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) - return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - default: - if (typeof object.history === "number") { - message.history = object.history; - break; - } - break; - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; - } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - if (typeof object.style[i] === "number") { - message.style[i] = object.style[i]; - break; - } - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; - } - return object; - }; - - /** - * Converts this ResourceDescriptor to JSON. - * @function toJSON - * @memberof google.api.ResourceDescriptor - * @instance - * @returns {Object.} JSON object - */ - ResourceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceDescriptor - * @function getTypeUrl - * @memberof google.api.ResourceDescriptor - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceDescriptor"; - }; - - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); - - return ResourceDescriptor; - })(); - - api.ResourceReference = (function() { - - /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType - */ - - /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference - * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set - */ - function ResourceReference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.type = ""; - - /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.childType = ""; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @function create - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance - */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); - }; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); - return writer; - }; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - message.childType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceReference message. - * @function verify - * @memberof google.api.ResourceReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; - return null; - }; - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceReference - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference - */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) - return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); - return message; - }; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceReference - * @static - * @param {google.api.ResourceReference} message ResourceReference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceReference.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = ""; - object.childType = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; - return object; - }; - - /** - * Converts this ResourceReference to JSON. - * @function toJSON - * @memberof google.api.ResourceReference - * @instance - * @returns {Object.} JSON object - */ - ResourceReference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceReference - * @function getTypeUrl - * @memberof google.api.ResourceReference - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceReference"; - }; - - return ResourceReference; - })(); - - return api; - })(); - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.FileDescriptorSet = (function() { - - /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file - */ - - /** - * Constructs a new FileDescriptorSet. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet - * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - */ - function FileDescriptorSet(properties) { - this.file = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance - */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); - }; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorSet message. - * @function verify - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) - return "file: array expected"; - for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); - if (error) - return "file." + error; - } - } - return null; - }; - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) - return object; - var message = new $root.google.protobuf.FileDescriptorSet(); - if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; - for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); - } - return object; - }; - - /** - * Converts this FileDescriptorSet to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorSet - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorSet - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; - }; - - return FileDescriptorSet; - })(); - - /** - * Edition enum. - * @name google.protobuf.Edition - * @enum {number} - * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value - * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value - * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value - * @property {number} EDITION_2023=1000 EDITION_2023 value - * @property {number} EDITION_2024=1001 EDITION_2024 value - * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value - * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value - * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value - * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value - * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value - * @property {number} EDITION_MAX=2147483647 EDITION_MAX value - */ - protobuf.Edition = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EDITION_UNKNOWN"] = 0; - values[valuesById[998] = "EDITION_PROTO2"] = 998; - values[valuesById[999] = "EDITION_PROTO3"] = 999; - values[valuesById[1000] = "EDITION_2023"] = 1000; - values[valuesById[1001] = "EDITION_2024"] = 1001; - values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; - values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; - values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; - values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; - values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; - values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; - return values; - })(); - - protobuf.FileDescriptorProto = (function() { - - /** - * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto - * @property {string|null} [name] FileDescriptorProto name - * @property {string|null} ["package"] FileDescriptorProto package - * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency - * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency - * @property {Array.|null} [messageType] FileDescriptorProto messageType - * @property {Array.|null} [enumType] FileDescriptorProto enumType - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo - * @property {string|null} [syntax] FileDescriptorProto syntax - * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition - */ - - /** - * Constructs a new FileDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto - * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; - - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; - - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; - - /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - - /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - - /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; - - /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.service = $util.emptyArray; - - /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.extension = $util.emptyArray; - - /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.options = null; - - /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.sourceCodeInfo = null; - - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; - - /** - * FileDescriptorProto edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.edition = 0; - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance - */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); - }; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message["package"] = reader.string(); - break; - } - case 3: { - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - } - case 10: { - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - } - case 11: { - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - } - case 4: { - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 8: { - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.syntax = reader.string(); - break; - } - case 14: { - message.edition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorProto message. - * @function verify - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) - return "dependency: array expected"; - for (var i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); - if (error) - return "service." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); - if (error) - return "sourceCodeInfo." + error; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) - return object; - var message = new $root.google.protobuf.FileDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; - for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); - } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); - } - if (object.syntax != null) - message.syntax = String(object.syntax); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FileDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; - }; - - return FileDescriptorProto; - })(); - - protobuf.DescriptorProto = (function() { - - /** - * Properties of a DescriptorProto. - * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName - */ - - /** - * Constructs a new DescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto - * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; - - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.field = $util.emptyArray; - - /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension = $util.emptyArray; - - /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nestedType = $util.emptyArray; - - /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; - - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance - */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); - }; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - } - case 10: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DescriptorProto message. - * @function verify - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) - return "field: array expected"; - for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); - if (error) - return "field." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { - if (!Array.isArray(message.nestedType)) - return "nestedType: array expected"; - for (var i = 0; i < message.nestedType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); - if (error) - return "nestedType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { - if (!Array.isArray(message.extensionRange)) - return "extensionRange: array expected"; - for (var i = 0; i < message.extensionRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); - if (error) - return "extensionRange." + error; - } - } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { - if (!Array.isArray(message.oneofDecl)) - return "oneofDecl: array expected"; - for (var i = 0; i < message.oneofDecl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); - if (error) - return "oneofDecl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto - */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) - return object; - var message = new $root.google.protobuf.DescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; - for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); - } - } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; - object.enumType = []; - object.extensionRange = []; - object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this DescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto - * @instance - * @returns {Object.} JSON object - */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto"; - }; - - DescriptorProto.ExtensionRange = (function() { - - /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options - */ - - /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange - * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - */ - function ExtensionRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; - - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; - - /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.options = null; - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance - */ - ExtensionRange.create = function create(properties) { - return new ExtensionRange(properties); - }; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); - message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - object.options = null; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ExtensionRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - * @returns {Object.} JSON object - */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; - }; - - return ExtensionRange; - })(); - - DescriptorProto.ReservedRange = (function() { - - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ - - /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange - * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - */ - function ReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; - - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance - */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); - }; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReservedRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReservedRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; - }; - - return ReservedRange; - })(); - - return DescriptorProto; - })(); - - protobuf.ExtensionRangeOptions = (function() { - - /** - * Properties of an ExtensionRangeOptions. - * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption - * @property {Array.|null} [declaration] ExtensionRangeOptions declaration - * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features - * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification - */ - - /** - * Constructs a new ExtensionRangeOptions. - * @memberof google.protobuf - * @classdesc Represents an ExtensionRangeOptions. - * @implements IExtensionRangeOptions - * @constructor - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - */ - function ExtensionRangeOptions(properties) { - this.uninterpretedOption = []; - this.declaration = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRangeOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ExtensionRangeOptions declaration. - * @member {Array.} declaration - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.declaration = $util.emptyArray; - - /** - * ExtensionRangeOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.features = null; - - /** - * ExtensionRangeOptions verification. - * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.verification = 1; - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance - */ - ExtensionRangeOptions.create = function create(properties) { - return new ExtensionRangeOptions(properties); - }; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.declaration != null && message.declaration.length) - for (var i = 0; i < message.declaration.length; ++i) - $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.declaration && message.declaration.length)) - message.declaration = []; - message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.verification = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRangeOptions message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRangeOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message.declaration != null && message.hasOwnProperty("declaration")) { - if (!Array.isArray(message.declaration)) - return "declaration: array expected"; - for (var i = 0; i < message.declaration.length; ++i) { - var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); - if (error) - return "declaration." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.verification != null && message.hasOwnProperty("verification")) - switch (message.verification) { - default: - return "verification: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - */ - ExtensionRangeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object.declaration) { - if (!Array.isArray(object.declaration)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); - message.declaration = []; - for (var i = 0; i < object.declaration.length; ++i) { - if (typeof object.declaration[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); - message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - switch (object.verification) { - case "DECLARATION": - case 0: - message.verification = 0; - break; - default: - if (typeof object.verification === "number") { - message.verification = object.verification; - break; - } - break; - case "UNVERIFIED": - case 1: - message.verification = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRangeOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.declaration = []; - object.uninterpretedOption = []; - } - if (options.defaults) { - object.verification = options.enums === String ? "UNVERIFIED" : 1; - object.features = null; - } - if (message.declaration && message.declaration.length) { - object.declaration = []; - for (var j = 0; j < message.declaration.length; ++j) - object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); - } - if (message.verification != null && message.hasOwnProperty("verification")) - object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - * @returns {Object.} JSON object - */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; - }; - - ExtensionRangeOptions.Declaration = (function() { - - /** - * Properties of a Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @interface IDeclaration - * @property {number|null} [number] Declaration number - * @property {string|null} [fullName] Declaration fullName - * @property {string|null} [type] Declaration type - * @property {boolean|null} [reserved] Declaration reserved - * @property {boolean|null} [repeated] Declaration repeated - */ - - /** - * Constructs a new Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @classdesc Represents a Declaration. - * @implements IDeclaration - * @constructor - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - */ - function Declaration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Declaration number. - * @member {number} number - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.number = 0; - - /** - * Declaration fullName. - * @member {string} fullName - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.fullName = ""; - - /** - * Declaration type. - * @member {string} type - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.type = ""; - - /** - * Declaration reserved. - * @member {boolean} reserved - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.reserved = false; - - /** - * Declaration repeated. - * @member {boolean} repeated - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.repeated = false; - - /** - * Creates a new Declaration instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance - */ - Declaration.create = function create(properties) { - return new Declaration(properties); - }; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); - if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); - if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); - return writer; - }; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.number = reader.int32(); - break; - } - case 2: { - message.fullName = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - case 5: { - message.reserved = reader.bool(); - break; - } - case 6: { - message.repeated = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Declaration message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Declaration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) - if (!$util.isString(message.fullName)) - return "fullName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.reserved != null && message.hasOwnProperty("reserved")) - if (typeof message.reserved !== "boolean") - return "reserved: boolean expected"; - if (message.repeated != null && message.hasOwnProperty("repeated")) - if (typeof message.repeated !== "boolean") - return "repeated: boolean expected"; - return null; - }; - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - */ - Declaration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - if (object.number != null) - message.number = object.number | 0; - if (object.fullName != null) - message.fullName = String(object.fullName); - if (object.type != null) - message.type = String(object.type); - if (object.reserved != null) - message.reserved = Boolean(object.reserved); - if (object.repeated != null) - message.repeated = Boolean(object.repeated); - return message; - }; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Declaration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.number = 0; - object.fullName = ""; - object.type = ""; - object.reserved = false; - object.repeated = false; - } - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.fullName != null && message.hasOwnProperty("fullName")) - object.fullName = message.fullName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.reserved != null && message.hasOwnProperty("reserved")) - object.reserved = message.reserved; - if (message.repeated != null && message.hasOwnProperty("repeated")) - object.repeated = message.repeated; - return object; - }; - - /** - * Converts this Declaration to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - * @returns {Object.} JSON object - */ - Declaration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Declaration - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; - }; - - return Declaration; - })(); - - /** - * VerificationState enum. - * @name google.protobuf.ExtensionRangeOptions.VerificationState - * @enum {number} - * @property {number} DECLARATION=0 DECLARATION value - * @property {number} UNVERIFIED=1 UNVERIFIED value - */ - ExtensionRangeOptions.VerificationState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DECLARATION"] = 0; - values[valuesById[1] = "UNVERIFIED"] = 1; - return values; - })(); - - return ExtensionRangeOptions; - })(); - - protobuf.FieldDescriptorProto = (function() { - - /** - * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options - * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional - */ - - /** - * Constructs a new FieldDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto - * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - */ - function FieldDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; - - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; - - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; - - /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type = 1; - - /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.typeName = ""; - - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; - - /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; - - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; - - /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.jsonName = ""; - - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.proto3Optional = false; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance - */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); - }; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); - return writer; - }; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.number = reader.int32(); - break; - } - case 4: { - message.label = reader.int32(); - break; - } - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.typeName = reader.string(); - break; - } - case 2: { - message.extendee = reader.string(); - break; - } - case 7: { - message.defaultValue = reader.string(); - break; - } - case 9: { - message.oneofIndex = reader.int32(); - break; - } - case 10: { - message.jsonName = reader.string(); - break; - } - case 8: { - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - } - case 17: { - message.proto3Optional = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldDescriptorProto message. - * @function verify - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) - switch (message.label) { - default: - return "label: enum value expected"; - case 1: - case 3: - case 2: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } - if (message.typeName != null && message.hasOwnProperty("typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; - return null; - }; - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) - return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - default: - if (typeof object.label === "number") { - message.label = object.label; - break; - } - break; - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_DOUBLE": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; - break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; - break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; - break; - case "TYPE_SINT32": - case 17: - message.type = 17; - break; - case "TYPE_SINT64": - case 18: - message.type = 18; - break; - } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } - if (object.proto3Optional != null) - message.proto3Optional = Boolean(object.proto3Optional); - return message; - }; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - object.proto3Optional = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - object.proto3Optional = message.proto3Optional; - return object; - }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; - }; - - /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {number} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value - */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[3] = "TYPE_INT64"] = 3; - values[valuesById[4] = "TYPE_UINT64"] = 4; - values[valuesById[5] = "TYPE_INT32"] = 5; - values[valuesById[6] = "TYPE_FIXED64"] = 6; - values[valuesById[7] = "TYPE_FIXED32"] = 7; - values[valuesById[8] = "TYPE_BOOL"] = 8; - values[valuesById[9] = "TYPE_STRING"] = 9; - values[valuesById[10] = "TYPE_GROUP"] = 10; - values[valuesById[11] = "TYPE_MESSAGE"] = 11; - values[valuesById[12] = "TYPE_BYTES"] = 12; - values[valuesById[13] = "TYPE_UINT32"] = 13; - values[valuesById[14] = "TYPE_ENUM"] = 14; - values[valuesById[15] = "TYPE_SFIXED32"] = 15; - values[valuesById[16] = "TYPE_SFIXED64"] = 16; - values[valuesById[17] = "TYPE_SINT32"] = 17; - values[valuesById[18] = "TYPE_SINT64"] = 18; - return values; - })(); - - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[3] = "LABEL_REPEATED"] = 3; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; - return values; - })(); - - return FieldDescriptorProto; - })(); - - protobuf.OneofDescriptorProto = (function() { - - /** - * Properties of an OneofDescriptorProto. - * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options - */ - - /** - * Constructs a new OneofDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto - * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - */ - function OneofDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; - - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.options = null; - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance - */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); - }; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofDescriptorProto message. - * @function verify - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.OneofOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) - return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; - }; - - return OneofDescriptorProto; - })(); - - protobuf.EnumDescriptorProto = (function() { - - /** - * Properties of an EnumDescriptorProto. - * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange - * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName - */ - - /** - * Constructs a new EnumDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto - * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; - - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; - - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; - - /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance - */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) - return "value: array expected"; - for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); - if (error) - return "value." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; - for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; - }; - - EnumDescriptorProto.EnumReservedRange = (function() { - - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ - - /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange - * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - */ - function EnumReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; - - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance - */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); - }; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumReservedRange message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - */ - EnumReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this EnumReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - * @returns {Object.} JSON object - */ - EnumReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumReservedRange - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; - }; - - return EnumReservedRange; - })(); - - return EnumDescriptorProto; - })(); - - protobuf.EnumValueDescriptorProto = (function() { - - /** - * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options - */ - - /** - * Constructs a new EnumValueDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto - * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - */ - function EnumValueDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; - - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; - - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance - */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.number = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; - }; - - return EnumValueDescriptorProto; - })(); - - protobuf.ServiceDescriptorProto = (function() { - - /** - * Properties of a ServiceDescriptorProto. - * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options - */ - - /** - * Constructs a new ServiceDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto - * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - */ - function ServiceDescriptorProto(properties) { - this.method = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; - - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; - - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance - */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); - }; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceDescriptorProto message. - * @function verify - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) - return "method: array expected"; - for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); - if (error) - return "method." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) - return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; - }; - - return ServiceDescriptorProto; - })(); - - protobuf.MethodDescriptorProto = (function() { - - /** - * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming - */ - - /** - * Constructs a new MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto - * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - */ - function MethodDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; - - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; - - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; - - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance - */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); - }; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); - return writer; - }; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.inputType = reader.string(); - break; - } - case 3: { - message.outputType = reader.string(); - break; - } - case 4: { - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - } - case 5: { - message.clientStreaming = reader.bool(); - break; - } - case 6: { - message.serverStreaming = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodDescriptorProto message. - * @function verify - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.inputType != null && message.hasOwnProperty("inputType")) - if (!$util.isString(message.inputType)) - return "inputType: string expected"; - if (message.outputType != null && message.hasOwnProperty("outputType")) - if (!$util.isString(message.outputType)) - return "outputType: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - if (typeof message.clientStreaming !== "boolean") - return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - if (typeof message.serverStreaming !== "boolean") - return "serverStreaming: boolean expected"; - return null; - }; - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) - return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.inputType != null) - message.inputType = String(object.inputType); - if (object.outputType != null) - message.outputType = String(object.outputType); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); - } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); - return message; - }; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) - object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - object.serverStreaming = message.serverStreaming; - return object; - }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; - }; - - return MethodDescriptorProto; - })(); - - protobuf.FileOptions = (function() { - - /** - * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {string|null} [swiftPrefix] FileOptions swiftPrefix - * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix - * @property {string|null} [phpNamespace] FileOptions phpNamespace - * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace - * @property {string|null} [rubyPackage] FileOptions rubyPackage - * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition - */ - - /** - * Constructs a new FileOptions. - * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions - * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - */ - function FileOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.resourceDefinition"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; - - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; - - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; - - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; - - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; - - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; - - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; - - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; - - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; - - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; - - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; - - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = true; - - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; - - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; - - /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.swiftPrefix = ""; - - /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpClassPrefix = ""; - - /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpNamespace = ""; - - /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpMetadataNamespace = ""; - - /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.rubyPackage = ""; - - /** - * FileOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.features = null; - - /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; - - /** - * Creates a new FileOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance - */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); - }; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) - writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) - writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.javaPackage = reader.string(); - break; - } - case 8: { - message.javaOuterClassname = reader.string(); - break; - } - case 10: { - message.javaMultipleFiles = reader.bool(); - break; - } - case 20: { - message.javaGenerateEqualsAndHash = reader.bool(); - break; - } - case 27: { - message.javaStringCheckUtf8 = reader.bool(); - break; - } - case 9: { - message.optimizeFor = reader.int32(); - break; - } - case 11: { - message.goPackage = reader.string(); - break; - } - case 16: { - message.ccGenericServices = reader.bool(); - break; - } - case 17: { - message.javaGenericServices = reader.bool(); - break; - } - case 18: { - message.pyGenericServices = reader.bool(); - break; - } - case 23: { - message.deprecated = reader.bool(); - break; - } - case 31: { - message.ccEnableArenas = reader.bool(); - break; - } - case 36: { - message.objcClassPrefix = reader.string(); - break; - } - case 37: { - message.csharpNamespace = reader.string(); - break; - } - case 39: { - message.swiftPrefix = reader.string(); - break; - } - case 40: { - message.phpClassPrefix = reader.string(); - break; - } - case 41: { - message.phpNamespace = reader.string(); - break; - } - case 44: { - message.phpMetadataNamespace = reader.string(); - break; - } - case 45: { - message.rubyPackage = reader.string(); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileOptions message. - * @function verify - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - if (!$util.isString(message.javaPackage)) - return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - if (!$util.isString(message.javaOuterClassname)) - return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - if (typeof message.javaMultipleFiles !== "boolean") - return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - if (typeof message.javaGenerateEqualsAndHash !== "boolean") - return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - if (typeof message.javaStringCheckUtf8 !== "boolean") - return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - switch (message.optimizeFor) { - default: - return "optimizeFor: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - if (!$util.isString(message.goPackage)) - return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - if (typeof message.ccGenericServices !== "boolean") - return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - if (typeof message.javaGenericServices !== "boolean") - return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - if (typeof message.pyGenericServices !== "boolean") - return "pyGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - if (typeof message.ccEnableArenas !== "boolean") - return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - if (!$util.isString(message.objcClassPrefix)) - return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - if (!$util.isString(message.csharpNamespace)) - return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - if (!$util.isString(message.swiftPrefix)) - return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - if (!$util.isString(message.phpClassPrefix)) - return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - if (!$util.isString(message.phpNamespace)) - return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - if (!$util.isString(message.phpMetadataNamespace)) - return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - if (!$util.isString(message.rubyPackage)) - return "rubyPackage: string expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); - if (error) - return ".google.api.resourceDefinition." + error; - } - } - return null; - }; - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions - */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - default: - if (typeof object.optimizeFor === "number") { - message.optimizeFor = object.optimizeFor; - break; - } - break; - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; - } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.ccEnableArenas != null) - message.ccEnableArenas = Boolean(object.ccEnableArenas); - if (object.objcClassPrefix != null) - message.objcClassPrefix = String(object.objcClassPrefix); - if (object.csharpNamespace != null) - message.csharpNamespace = String(object.csharpNamespace); - if (object.swiftPrefix != null) - message.swiftPrefix = String(object.swiftPrefix); - if (object.phpClassPrefix != null) - message.phpClassPrefix = String(object.phpClassPrefix); - if (object.phpNamespace != null) - message.phpNamespace = String(object.phpNamespace); - if (object.phpMetadataNamespace != null) - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - if (object.rubyPackage != null) - message.rubyPackage = String(object.rubyPackage); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FileOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.FileOptions} message FileOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; - } - if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = true; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object.swiftPrefix = ""; - object.phpClassPrefix = ""; - object.phpNamespace = ""; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; - object.features = null; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); - } - return object; - }; - - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileOptions - * @function getTypeUrl - * @memberof google.protobuf.FileOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileOptions"; - }; - - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; - })(); - - return FileOptions; - })(); - - protobuf.MessageOptions = (function() { - - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource - */ - - /** - * Constructs a new MessageOptions. - * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions - * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - */ - function MessageOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; - - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; - - /** - * MessageOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * MessageOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.features = null; - - /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".google.api.resource"] = null; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance - */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); - }; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.messageSetWireFormat = reader.bool(); - break; - } - case 2: { - message.noStandardDescriptorAccessor = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 7: { - message.mapEntry = reader.bool(); - break; - } - case 11: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 12: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageOptions message. - * @function verify - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - if (typeof message.messageSetWireFormat !== "boolean") - return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - if (typeof message.noStandardDescriptorAccessor !== "boolean") - return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - if (typeof message.mapEntry !== "boolean") - return "mapEntry: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); - if (error) - return ".google.api.resource." + error; - } - return null; - }; - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions - */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MessageOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } - return message; - }; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.MessageOptions} message MessageOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); - return object; - }; - - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MessageOptions - * @function getTypeUrl - * @memberof google.protobuf.MessageOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MessageOptions"; - }; - - return MessageOptions; - })(); - - protobuf.FieldOptions = (function() { - - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {boolean|null} [debugRedact] FieldOptions debugRedact - * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention - * @property {Array.|null} [targets] FieldOptions targets - * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults - * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference - */ - - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { - this.targets = []; - this.editionDefaults = []; - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; - - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; - - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; - - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; - - /** - * FieldOptions unverifiedLazy. - * @member {boolean} unverifiedLazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.unverifiedLazy = false; - - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; - - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; - - /** - * FieldOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.debugRedact = false; - - /** - * FieldOptions retention. - * @member {google.protobuf.FieldOptions.OptionRetention} retention - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.retention = 0; - - /** - * FieldOptions targets. - * @member {Array.} targets - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.targets = $util.emptyArray; - - /** - * FieldOptions editionDefaults. - * @member {Array.} editionDefaults - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.editionDefaults = $util.emptyArray; - - /** - * FieldOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.features = null; - - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; - - /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.resourceReference"] = null; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance - */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); - }; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); - if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); - if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) - writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); - if (message.targets != null && message.targets.length) - for (var i = 0; i < message.targets.length; ++i) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); - if (message.editionDefaults != null && message.editionDefaults.length) - for (var i = 0; i < message.editionDefaults.length; ++i) - $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); - if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) - $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ctype = reader.int32(); - break; - } - case 2: { - message.packed = reader.bool(); - break; - } - case 6: { - message.jstype = reader.int32(); - break; - } - case 5: { - message.lazy = reader.bool(); - break; - } - case 15: { - message.unverifiedLazy = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 10: { - message.weak = reader.bool(); - break; - } - case 16: { - message.debugRedact = reader.bool(); - break; - } - case 17: { - message.retention = reader.int32(); - break; - } - case 19: { - if (!(message.targets && message.targets.length)) - message.targets = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.targets.push(reader.int32()); - } else - message.targets.push(reader.int32()); - break; - } - case 20: { - if (!(message.editionDefaults && message.editionDefaults.length)) - message.editionDefaults = []; - message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); - break; - } - case 21: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1052: { - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - } - case 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - if (typeof message.unverifiedLazy !== "boolean") - return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.retention != null && message.hasOwnProperty("retention")) - switch (message.retention) { - default: - return "retention: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.targets != null && message.hasOwnProperty("targets")) { - if (!Array.isArray(message.targets)) - return "targets: array expected"; - for (var i = 0; i < message.targets.length; ++i) - switch (message.targets[i]) { - default: - return "targets: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { - if (!Array.isArray(message.editionDefaults)) - return "editionDefaults: array expected"; - for (var i = 0; i < message.editionDefaults.length; ++i) { - var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); - if (error) - return "editionDefaults." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } - return null; - }; - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - default: - if (typeof object.ctype === "number") { - message.ctype = object.ctype; - break; - } - break; - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - default: - if (typeof object.jstype === "number") { - message.jstype = object.jstype; - break; - } - break; - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.unverifiedLazy != null) - message.unverifiedLazy = Boolean(object.unverifiedLazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - switch (object.retention) { - default: - if (typeof object.retention === "number") { - message.retention = object.retention; - break; - } - break; - case "RETENTION_UNKNOWN": - case 0: - message.retention = 0; - break; - case "RETENTION_RUNTIME": - case 1: - message.retention = 1; - break; - case "RETENTION_SOURCE": - case 2: - message.retention = 2; - break; - } - if (object.targets) { - if (!Array.isArray(object.targets)) - throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); - message.targets = []; - for (var i = 0; i < object.targets.length; ++i) - switch (object.targets[i]) { - default: - if (typeof object.targets[i] === "number") { - message.targets[i] = object.targets[i]; - break; - } - case "TARGET_TYPE_UNKNOWN": - case 0: - message.targets[i] = 0; - break; - case "TARGET_TYPE_FILE": - case 1: - message.targets[i] = 1; - break; - case "TARGET_TYPE_EXTENSION_RANGE": - case 2: - message.targets[i] = 2; - break; - case "TARGET_TYPE_MESSAGE": - case 3: - message.targets[i] = 3; - break; - case "TARGET_TYPE_FIELD": - case 4: - message.targets[i] = 4; - break; - case "TARGET_TYPE_ONEOF": - case 5: - message.targets[i] = 5; - break; - case "TARGET_TYPE_ENUM": - case 6: - message.targets[i] = 6; - break; - case "TARGET_TYPE_ENUM_ENTRY": - case 7: - message.targets[i] = 7; - break; - case "TARGET_TYPE_SERVICE": - case 8: - message.targets[i] = 8; - break; - case "TARGET_TYPE_METHOD": - case 9: - message.targets[i] = 9; - break; - } - } - if (object.editionDefaults) { - if (!Array.isArray(object.editionDefaults)) - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); - message.editionDefaults = []; - for (var i = 0; i < object.editionDefaults.length; ++i) { - if (typeof object.editionDefaults[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); - message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FieldOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - if (typeof object[".google.api.fieldBehavior"][i] === "number") { - message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; - break; - } - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - case "IDENTIFIER": - case 8: - message[".google.api.fieldBehavior"][i] = 8; - break; - } - } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } - return message; - }; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.FieldOptions} message FieldOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.targets = []; - object.editionDefaults = []; - object.uninterpretedOption = []; - object[".google.api.fieldBehavior"] = []; - } - if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; - object.packed = false; - object.deprecated = false; - object.lazy = false; - object.jstype = options.enums === String ? "JS_NORMAL" : 0; - object.weak = false; - object.unverifiedLazy = false; - object.debugRedact = false; - object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; - object.features = null; - object[".google.api.resourceReference"] = null; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - object.unverifiedLazy = message.unverifiedLazy; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.retention != null && message.hasOwnProperty("retention")) - object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; - if (message.targets && message.targets.length) { - object.targets = []; - for (var j = 0; j < message.targets.length; ++j) - object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; - } - if (message.editionDefaults && message.editionDefaults.length) { - object.editionDefaults = []; - for (var j = 0; j < message.editionDefaults.length; ++j) - object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { - object[".google.api.fieldBehavior"] = []; - for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); - return object; - }; - - /** - * Converts this FieldOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions - * @instance - * @returns {Object.} JSON object - */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldOptions - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions"; - }; - - /** - * CType enum. - * @name google.protobuf.FieldOptions.CType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} CORD=1 CORD value - * @property {number} STRING_PIECE=2 STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "CORD"] = 1; - values[valuesById[2] = "STRING_PIECE"] = 2; - return values; - })(); - - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {number} - * @property {number} JS_NORMAL=0 JS_NORMAL value - * @property {number} JS_STRING=1 JS_STRING value - * @property {number} JS_NUMBER=2 JS_NUMBER value - */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = 0; - values[valuesById[1] = "JS_STRING"] = 1; - values[valuesById[2] = "JS_NUMBER"] = 2; - return values; - })(); - - /** - * OptionRetention enum. - * @name google.protobuf.FieldOptions.OptionRetention - * @enum {number} - * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value - * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value - * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value - */ - FieldOptions.OptionRetention = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; - values[valuesById[1] = "RETENTION_RUNTIME"] = 1; - values[valuesById[2] = "RETENTION_SOURCE"] = 2; - return values; - })(); - - /** - * OptionTargetType enum. - * @name google.protobuf.FieldOptions.OptionTargetType - * @enum {number} - * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value - * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value - * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value - * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value - * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value - * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value - * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value - * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value - * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value - * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value - */ - FieldOptions.OptionTargetType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; - values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; - values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; - values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; - values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; - values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; - values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; - values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; - values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; - return values; - })(); - - FieldOptions.EditionDefault = (function() { - - /** - * Properties of an EditionDefault. - * @memberof google.protobuf.FieldOptions - * @interface IEditionDefault - * @property {google.protobuf.Edition|null} [edition] EditionDefault edition - * @property {string|null} [value] EditionDefault value - */ - - /** - * Constructs a new EditionDefault. - * @memberof google.protobuf.FieldOptions - * @classdesc Represents an EditionDefault. - * @implements IEditionDefault - * @constructor - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - */ - function EditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.edition = 0; - - /** - * EditionDefault value. - * @member {string} value - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.value = ""; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance - */ - EditionDefault.create = function create(properties) { - return new EditionDefault(properties); - }; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EditionDefault message. - * @function verify - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - */ - EditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) - return object; - var message = new $root.google.protobuf.FieldOptions.EditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.value = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this EditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - * @returns {Object.} JSON object - */ - EditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; - }; - - return EditionDefault; - })(); - - return FieldOptions; - })(); - - protobuf.OneofOptions = (function() { - - /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption - */ - - /** - * Constructs a new OneofOptions. - * @memberof google.protobuf - * @classdesc Represents an OneofOptions. - * @implements IOneofOptions - * @constructor - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - */ - function OneofOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.features = null; - - /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - * @returns {google.protobuf.OneofOptions} OneofOptions instance - */ - OneofOptions.create = function create(properties) { - return new OneofOptions(properties); - }; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofOptions message. - * @function verify - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions - */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) - return object; - var message = new $root.google.protobuf.OneofOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.OneofOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.OneofOptions} message OneofOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.features = null; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this OneofOptions to JSON. - * @function toJSON - * @memberof google.protobuf.OneofOptions - * @instance - * @returns {Object.} JSON object - */ - OneofOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofOptions - * @function getTypeUrl - * @memberof google.protobuf.OneofOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofOptions"; - }; - - return OneofOptions; - })(); - - protobuf.EnumOptions = (function() { - - /** - * Properties of an EnumOptions. - * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features - * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption - */ - - /** - * Constructs a new EnumOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumOptions. - * @implements IEnumOptions - * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - */ - function EnumOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allowAlias = false; - - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; - - /** - * EnumOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * EnumOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.features = null; - - /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumOptions} EnumOptions instance - */ - EnumOptions.create = function create(properties) { - return new EnumOptions(properties); - }; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.allowAlias = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 6: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 7: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumOptions message. - * @function verify - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - if (typeof message.allowAlias !== "boolean") - return "allowAlias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions - */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) - return object; - var message = new $root.google.protobuf.EnumOptions(); - if (object.allowAlias != null) - message.allowAlias = Boolean(object.allowAlias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.EnumOptions} message EnumOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.allowAlias = false; - object.deprecated = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumOptions - * @instance - * @returns {Object.} JSON object - */ - EnumOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumOptions"; - }; - - return EnumOptions; - })(); - - protobuf.EnumValueOptions = (function() { - - /** - * Properties of an EnumValueOptions. - * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features - * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption - */ - - /** - * Constructs a new EnumValueOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions - * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - */ - function EnumValueOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.deprecated = false; - - /** - * EnumValueOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.features = null; - - /** - * EnumValueOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.debugRedact = false; - - /** - * EnumValueOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance - */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); - }; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.deprecated = reader.bool(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.debugRedact = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueOptions message. - * @function verify - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) - return object; - var message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object.debugRedact = false; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumValueOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueOptions - * @instance - * @returns {Object.} JSON object - */ - EnumValueOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; - }; - - return EnumValueOptions; - })(); - - protobuf.ServiceOptions = (function() { - - /** - * Properties of a ServiceOptions. - * @memberof google.protobuf - * @interface IServiceOptions - * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features - * @property {boolean|null} [deprecated] ServiceOptions deprecated - * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption - * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost - * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes - * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion - */ - - /** - * Constructs a new ServiceOptions. - * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions - * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - */ - function ServiceOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.features = null; - - /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.deprecated = false; - - /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; - - /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; - - /** - * ServiceOptions .google.api.apiVersion. - * @member {string} .google.api.apiVersion - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.apiVersion"] = ""; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance - */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); - }; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) - writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); - if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) - writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); - if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) - writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); - return writer; - }; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 34: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 33: { - message.deprecated = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1049: { - message[".google.api.defaultHost"] = reader.string(); - break; - } - case 1050: { - message[".google.api.oauthScopes"] = reader.string(); - break; - } - case 525000001: { - message[".google.api.apiVersion"] = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceOptions message. - * @function verify - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - if (!$util.isString(message[".google.api.defaultHost"])) - return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - if (!$util.isString(message[".google.api.oauthScopes"])) - return ".google.api.oauthScopes: string expected"; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - if (!$util.isString(message[".google.api.apiVersion"])) - return ".google.api.apiVersion: string expected"; - return null; - }; - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions - */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) - return object; - var message = new $root.google.protobuf.ServiceOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.defaultHost"] != null) - message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); - if (object[".google.api.oauthScopes"] != null) - message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); - if (object[".google.api.apiVersion"] != null) - message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); - return message; - }; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; - object[".google.api.apiVersion"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; - return object; - }; - - /** - * Converts this ServiceOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceOptions - * @instance - * @returns {Object.} JSON object - */ - ServiceOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceOptions - * @function getTypeUrl - * @memberof google.protobuf.ServiceOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceOptions"; - }; - - return ServiceOptions; - })(); - - protobuf.MethodOptions = (function() { - - /** - * Properties of a MethodOptions. - * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel - * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features - * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature - */ - - /** - * Constructs a new MethodOptions. - * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions - * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.idempotencyLevel = 0; - - /** - * MethodOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.features = null; - - /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; - - /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance - */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); - }; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 33: { - message.deprecated = reader.bool(); - break; - } - case 34: { - message.idempotencyLevel = reader.int32(); - break; - } - case 35: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 72295728: { - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - } - case 1051: { - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodOptions message. - * @function verify - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - switch (message.idempotencyLevel) { - default: - return "idempotencyLevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } - return null; - }; - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions - */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) - return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - switch (object.idempotencyLevel) { - default: - if (typeof object.idempotencyLevel === "number") { - message.idempotencyLevel = object.idempotencyLevel; - break; - } - break; - case "IDEMPOTENCY_UNKNOWN": - case 0: - message.idempotencyLevel = 0; - break; - case "NO_SIDE_EFFECTS": - case 1: - message.idempotencyLevel = 1; - break; - case "IDEMPOTENT": - case 2: - message.idempotencyLevel = 2; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MethodOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } - return message; - }; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.MethodOptions} message MethodOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } - if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object.features = null; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); - return object; - }; - - /** - * Converts this MethodOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MethodOptions - * @instance - * @returns {Object.} JSON object - */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodOptions - * @function getTypeUrl - * @memberof google.protobuf.MethodOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodOptions"; - }; - - /** - * IdempotencyLevel enum. - * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {number} - * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value - * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value - * @property {number} IDEMPOTENT=2 IDEMPOTENT value - */ - MethodOptions.IdempotencyLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; - values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; - values[valuesById[2] = "IDEMPOTENT"] = 2; - return values; - })(); - - return MethodOptions; - })(); - - protobuf.UninterpretedOption = (function() { - - /** - * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue - */ - - /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption - * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - */ - function UninterpretedOption(properties) { - this.name = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; - - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; - - /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.doubleValue = 0; - - /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); - - /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregateValue = ""; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance - */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); - }; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.name.length) - for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); - return writer; - }; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - } - case 3: { - message.identifierValue = reader.string(); - break; - } - case 4: { - message.positiveIntValue = reader.uint64(); - break; - } - case 5: { - message.negativeIntValue = reader.int64(); - break; - } - case 6: { - message.doubleValue = reader.double(); - break; - } - case 7: { - message.stringValue = reader.bytes(); - break; - } - case 8: { - message.aggregateValue = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UninterpretedOption message. - * @function verify - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UninterpretedOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) - return "name: array expected"; - for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); - if (error) - return "name." + error; - } - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - if (!$util.isString(message.identifierValue)) - return "identifierValue: string expected"; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) - return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) - return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) - return "stringValue: buffer expected"; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - if (!$util.isString(message.aggregateValue)) - return "aggregateValue: string expected"; - return null; - }; - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) - return object; - var message = new $root.google.protobuf.UninterpretedOption(); - if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; - for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); - } - } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); - if (object.negativeIntValue != null) - if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; - else if (typeof object.negativeIntValue === "string") - message.negativeIntValue = parseInt(object.negativeIntValue, 10); - else if (typeof object.negativeIntValue === "number") - message.negativeIntValue = object.negativeIntValue; - else if (typeof object.negativeIntValue === "object") - message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - if (typeof object.stringValue === "string") - $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length >= 0) - message.stringValue = object.stringValue; - if (object.aggregateValue != null) - message.aggregateValue = String(object.aggregateValue); - return message; - }; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UninterpretedOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.name = []; - if (options.defaults) { - object.identifierValue = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positiveIntValue = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negativeIntValue = options.longs === String ? "0" : 0; - object.doubleValue = 0; - if (options.bytes === String) - object.stringValue = ""; - else { - object.stringValue = []; - if (options.bytes !== Array) - object.stringValue = $util.newBuffer(object.stringValue); - } - object.aggregateValue = ""; - } - if (message.name && message.name.length) { - object.name = []; - for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") - object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; - else - object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (typeof message.negativeIntValue === "number") - object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; - else - object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - object.aggregateValue = message.aggregateValue; - return object; - }; - - /** - * Converts this UninterpretedOption to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption - * @instance - * @returns {Object.} JSON object - */ - UninterpretedOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UninterpretedOption - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; - }; - - UninterpretedOption.NamePart = (function() { - - /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension - */ - - /** - * Constructs a new NamePart. - * @memberof google.protobuf.UninterpretedOption - * @classdesc Represents a NamePart. - * @implements INamePart - * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - */ - function NamePart(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.namePart = ""; - - /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.isExtension = false; - - /** - * Creates a new NamePart instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance - */ - NamePart.create = function create(properties) { - return new NamePart(properties); - }; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); - return writer; - }; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.namePart = reader.string(); - break; - } - case 2: { - message.isExtension = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("namePart")) - throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!message.hasOwnProperty("isExtension")) - throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); - return message; - }; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NamePart message. - * @function verify - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NamePart.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (!$util.isString(message.namePart)) - return "namePart: string expected"; - if (typeof message.isExtension !== "boolean") - return "isExtension: boolean expected"; - return null; - }; - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - */ - NamePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) - return object; - var message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.namePart != null) - message.namePart = String(object.namePart); - if (object.isExtension != null) - message.isExtension = Boolean(object.isExtension); - return message; - }; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NamePart.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.namePart = ""; - object.isExtension = false; - } - if (message.namePart != null && message.hasOwnProperty("namePart")) - object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) - object.isExtension = message.isExtension; - return object; - }; - - /** - * Converts this NamePart to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - * @returns {Object.} JSON object - */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NamePart - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; - }; - - return NamePart; - })(); - - return UninterpretedOption; - })(); - - protobuf.FeatureSet = (function() { - - /** - * Properties of a FeatureSet. - * @memberof google.protobuf - * @interface IFeatureSet - * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence - * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType - * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding - * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation - * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding - * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat - */ - - /** - * Constructs a new FeatureSet. - * @memberof google.protobuf - * @classdesc Represents a FeatureSet. - * @implements IFeatureSet - * @constructor - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - */ - function FeatureSet(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSet fieldPresence. - * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.fieldPresence = 0; - - /** - * FeatureSet enumType. - * @member {google.protobuf.FeatureSet.EnumType} enumType - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.enumType = 0; - - /** - * FeatureSet repeatedFieldEncoding. - * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.repeatedFieldEncoding = 0; - - /** - * FeatureSet utf8Validation. - * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.utf8Validation = 0; - - /** - * FeatureSet messageEncoding. - * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.messageEncoding = 0; - - /** - * FeatureSet jsonFormat. - * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.jsonFormat = 0; - - /** - * Creates a new FeatureSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - * @returns {google.protobuf.FeatureSet} FeatureSet instance - */ - FeatureSet.create = function create(properties) { - return new FeatureSet(properties); - }; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); - if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); - if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); - if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); - if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); - return writer; - }; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.fieldPresence = reader.int32(); - break; - } - case 2: { - message.enumType = reader.int32(); - break; - } - case 3: { - message.repeatedFieldEncoding = reader.int32(); - break; - } - case 4: { - message.utf8Validation = reader.int32(); - break; - } - case 5: { - message.messageEncoding = reader.int32(); - break; - } - case 6: { - message.jsonFormat = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSet message. - * @function verify - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - switch (message.fieldPresence) { - default: - return "fieldPresence: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.enumType != null && message.hasOwnProperty("enumType")) - switch (message.enumType) { - default: - return "enumType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - switch (message.repeatedFieldEncoding) { - default: - return "repeatedFieldEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - switch (message.utf8Validation) { - default: - return "utf8Validation: enum value expected"; - case 0: - case 2: - case 3: - break; - } - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - switch (message.messageEncoding) { - default: - return "messageEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - switch (message.jsonFormat) { - default: - return "jsonFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSet} FeatureSet - */ - FeatureSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSet) - return object; - var message = new $root.google.protobuf.FeatureSet(); - switch (object.fieldPresence) { - default: - if (typeof object.fieldPresence === "number") { - message.fieldPresence = object.fieldPresence; - break; - } - break; - case "FIELD_PRESENCE_UNKNOWN": - case 0: - message.fieldPresence = 0; - break; - case "EXPLICIT": - case 1: - message.fieldPresence = 1; - break; - case "IMPLICIT": - case 2: - message.fieldPresence = 2; - break; - case "LEGACY_REQUIRED": - case 3: - message.fieldPresence = 3; - break; - } - switch (object.enumType) { - default: - if (typeof object.enumType === "number") { - message.enumType = object.enumType; - break; - } - break; - case "ENUM_TYPE_UNKNOWN": - case 0: - message.enumType = 0; - break; - case "OPEN": - case 1: - message.enumType = 1; - break; - case "CLOSED": - case 2: - message.enumType = 2; - break; - } - switch (object.repeatedFieldEncoding) { - default: - if (typeof object.repeatedFieldEncoding === "number") { - message.repeatedFieldEncoding = object.repeatedFieldEncoding; - break; - } - break; - case "REPEATED_FIELD_ENCODING_UNKNOWN": - case 0: - message.repeatedFieldEncoding = 0; - break; - case "PACKED": - case 1: - message.repeatedFieldEncoding = 1; - break; - case "EXPANDED": - case 2: - message.repeatedFieldEncoding = 2; - break; - } - switch (object.utf8Validation) { - default: - if (typeof object.utf8Validation === "number") { - message.utf8Validation = object.utf8Validation; - break; - } - break; - case "UTF8_VALIDATION_UNKNOWN": - case 0: - message.utf8Validation = 0; - break; - case "VERIFY": - case 2: - message.utf8Validation = 2; - break; - case "NONE": - case 3: - message.utf8Validation = 3; - break; - } - switch (object.messageEncoding) { - default: - if (typeof object.messageEncoding === "number") { - message.messageEncoding = object.messageEncoding; - break; - } - break; - case "MESSAGE_ENCODING_UNKNOWN": - case 0: - message.messageEncoding = 0; - break; - case "LENGTH_PREFIXED": - case 1: - message.messageEncoding = 1; - break; - case "DELIMITED": - case 2: - message.messageEncoding = 2; - break; - } - switch (object.jsonFormat) { - default: - if (typeof object.jsonFormat === "number") { - message.jsonFormat = object.jsonFormat; - break; - } - break; - case "JSON_FORMAT_UNKNOWN": - case 0: - message.jsonFormat = 0; - break; - case "ALLOW": - case 1: - message.jsonFormat = 1; - break; - case "LEGACY_BEST_EFFORT": - case 2: - message.jsonFormat = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.FeatureSet} message FeatureSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; - object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; - object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; - object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; - object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; - object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; - } - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; - if (message.enumType != null && message.hasOwnProperty("enumType")) - object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; - return object; - }; - - /** - * Converts this FeatureSet to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSet - * @instance - * @returns {Object.} JSON object - */ - FeatureSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSet - * @function getTypeUrl - * @memberof google.protobuf.FeatureSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSet"; - }; - - /** - * FieldPresence enum. - * @name google.protobuf.FeatureSet.FieldPresence - * @enum {number} - * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value - * @property {number} EXPLICIT=1 EXPLICIT value - * @property {number} IMPLICIT=2 IMPLICIT value - * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value - */ - FeatureSet.FieldPresence = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; - values[valuesById[1] = "EXPLICIT"] = 1; - values[valuesById[2] = "IMPLICIT"] = 2; - values[valuesById[3] = "LEGACY_REQUIRED"] = 3; - return values; - })(); - - /** - * EnumType enum. - * @name google.protobuf.FeatureSet.EnumType - * @enum {number} - * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value - * @property {number} OPEN=1 OPEN value - * @property {number} CLOSED=2 CLOSED value - */ - FeatureSet.EnumType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "OPEN"] = 1; - values[valuesById[2] = "CLOSED"] = 2; - return values; - })(); - - /** - * RepeatedFieldEncoding enum. - * @name google.protobuf.FeatureSet.RepeatedFieldEncoding - * @enum {number} - * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value - * @property {number} PACKED=1 PACKED value - * @property {number} EXPANDED=2 EXPANDED value - */ - FeatureSet.RepeatedFieldEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "PACKED"] = 1; - values[valuesById[2] = "EXPANDED"] = 2; - return values; - })(); - - /** - * Utf8Validation enum. - * @name google.protobuf.FeatureSet.Utf8Validation - * @enum {number} - * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value - * @property {number} VERIFY=2 VERIFY value - * @property {number} NONE=3 NONE value - */ - FeatureSet.Utf8Validation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; - values[valuesById[2] = "VERIFY"] = 2; - values[valuesById[3] = "NONE"] = 3; - return values; - })(); - - /** - * MessageEncoding enum. - * @name google.protobuf.FeatureSet.MessageEncoding - * @enum {number} - * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value - * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value - * @property {number} DELIMITED=2 DELIMITED value - */ - FeatureSet.MessageEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "LENGTH_PREFIXED"] = 1; - values[valuesById[2] = "DELIMITED"] = 2; - return values; - })(); - - /** - * JsonFormat enum. - * @name google.protobuf.FeatureSet.JsonFormat - * @enum {number} - * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value - * @property {number} ALLOW=1 ALLOW value - * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value - */ - FeatureSet.JsonFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; - values[valuesById[1] = "ALLOW"] = 1; - values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; - return values; - })(); - - return FeatureSet; - })(); - - protobuf.FeatureSetDefaults = (function() { - - /** - * Properties of a FeatureSetDefaults. - * @memberof google.protobuf - * @interface IFeatureSetDefaults - * @property {Array.|null} [defaults] FeatureSetDefaults defaults - * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition - * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition - */ - - /** - * Constructs a new FeatureSetDefaults. - * @memberof google.protobuf - * @classdesc Represents a FeatureSetDefaults. - * @implements IFeatureSetDefaults - * @constructor - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - */ - function FeatureSetDefaults(properties) { - this.defaults = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetDefaults defaults. - * @member {Array.} defaults - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.defaults = $util.emptyArray; - - /** - * FeatureSetDefaults minimumEdition. - * @member {google.protobuf.Edition} minimumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.minimumEdition = 0; - - /** - * FeatureSetDefaults maximumEdition. - * @member {google.protobuf.Edition} maximumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.maximumEdition = 0; - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance - */ - FeatureSetDefaults.create = function create(properties) { - return new FeatureSetDefaults(properties); - }; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.defaults != null && message.defaults.length) - for (var i = 0; i < message.defaults.length; ++i) - $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); - if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); - return writer; - }; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.defaults && message.defaults.length)) - message.defaults = []; - message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); - break; - } - case 4: { - message.minimumEdition = reader.int32(); - break; - } - case 5: { - message.maximumEdition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetDefaults message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetDefaults.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.defaults != null && message.hasOwnProperty("defaults")) { - if (!Array.isArray(message.defaults)) - return "defaults: array expected"; - for (var i = 0; i < message.defaults.length; ++i) { - var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); - if (error) - return "defaults." + error; - } - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - switch (message.minimumEdition) { - default: - return "minimumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - switch (message.maximumEdition) { - default: - return "maximumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - */ - FeatureSetDefaults.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults(); - if (object.defaults) { - if (!Array.isArray(object.defaults)) - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); - message.defaults = []; - for (var i = 0; i < object.defaults.length; ++i) { - if (typeof object.defaults[i] !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); - message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); - } - } - switch (object.minimumEdition) { - default: - if (typeof object.minimumEdition === "number") { - message.minimumEdition = object.minimumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.minimumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.minimumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.minimumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.minimumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.minimumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.minimumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.minimumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.minimumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.minimumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.minimumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.minimumEdition = 2147483647; - break; - } - switch (object.maximumEdition) { - default: - if (typeof object.maximumEdition === "number") { - message.maximumEdition = object.maximumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.maximumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.maximumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.maximumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.maximumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.maximumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.maximumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.maximumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.maximumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.maximumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.maximumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.maximumEdition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetDefaults.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.defaults = []; - if (options.defaults) { - object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.defaults && message.defaults.length) { - object.defaults = []; - for (var j = 0; j < message.defaults.length; ++j) - object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; - return object; - }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults - * @instance - * @returns {Object.} JSON object - */ - FeatureSetDefaults.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetDefaults - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; - }; - - FeatureSetDefaults.FeatureSetEditionDefault = (function() { - - /** - * Properties of a FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @interface IFeatureSetEditionDefault - * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features - */ - - /** - * Constructs a new FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @classdesc Represents a FeatureSetEditionDefault. - * @implements IFeatureSetEditionDefault - * @constructor - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - */ - function FeatureSetEditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetEditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.edition = 0; - - /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.features = null; - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance - */ - FeatureSetEditionDefault.create = function create(properties) { - return new FeatureSetEditionDefault(properties); - }; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetEditionDefault message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetEditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - return null; - }; - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - */ - FeatureSetEditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetEditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.features = null; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - * @returns {Object.} JSON object - */ - FeatureSetEditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; - }; - - return FeatureSetEditionDefault; - })(); - - return FeatureSetDefaults; - })(); - - protobuf.SourceCodeInfo = (function() { - - /** - * Properties of a SourceCodeInfo. - * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location - */ - - /** - * Constructs a new SourceCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo - * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - */ - function SourceCodeInfo(properties) { - this.location = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo - * @instance - */ - SourceCodeInfo.prototype.location = $util.emptyArray; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance - */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); - }; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.location != null && message.location.length) - for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceCodeInfo message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SourceCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) - return "location: array expected"; - for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); - if (error) - return "location." + error; - } - } - return null; - }; - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) - return object; - var message = new $root.google.protobuf.SourceCodeInfo(); - if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; - for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); - } - return object; - }; - - /** - * Converts this SourceCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo - * @instance - * @returns {Object.} JSON object - */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SourceCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; - }; - - SourceCodeInfo.Location = (function() { - - /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments - */ - - /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - */ - function Location(properties) { - this.path = []; - this.span = []; - this.leadingDetachedComments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; - - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; - - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; - - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; - - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; - - /** - * Creates a new Location instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance - */ - Location.create = function create(properties) { - return new Location(properties); - }; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); - if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); - return writer; - }; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - } - case 3: { - message.leadingComments = reader.string(); - break; - } - case 4: { - message.trailingComments = reader.string(); - break; - } - case 6: { - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Location message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Location.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) - return "span: array expected"; - for (var i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - if (!$util.isString(message.leadingComments)) - return "leadingComments: string expected"; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - if (!$util.isString(message.trailingComments)) - return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { - if (!Array.isArray(message.leadingDetachedComments)) - return "leadingDetachedComments: array expected"; - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - if (!$util.isString(message.leadingDetachedComments[i])) - return "leadingDetachedComments: string[] expected"; - } - return null; - }; - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) - return object; - var message = new $root.google.protobuf.SourceCodeInfo.Location(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; - for (var i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leadingComments != null) - message.leadingComments = String(object.leadingComments); - if (object.trailingComments != null) - message.trailingComments = String(object.trailingComments); - if (object.leadingDetachedComments) { - if (!Array.isArray(object.leadingDetachedComments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); - message.leadingDetachedComments = []; - for (var i = 0; i < object.leadingDetachedComments.length; ++i) - message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); - } - return message; - }; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Location.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leadingDetachedComments = []; - } - if (options.defaults) { - object.leadingComments = ""; - object.trailingComments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.span && message.span.length) { - object.span = []; - for (var j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - object.trailingComments = message.trailingComments; - if (message.leadingDetachedComments && message.leadingDetachedComments.length) { - object.leadingDetachedComments = []; - for (var j = 0; j < message.leadingDetachedComments.length; ++j) - object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; - } - return object; - }; - - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Location - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; - }; - - return Location; - })(); - - return SourceCodeInfo; - })(); - - protobuf.GeneratedCodeInfo = (function() { - - /** - * Properties of a GeneratedCodeInfo. - * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation - */ - - /** - * Constructs a new GeneratedCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo - * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - */ - function GeneratedCodeInfo(properties) { - this.annotation = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance - */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); - }; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.annotation != null && message.annotation.length) - for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GeneratedCodeInfo message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GeneratedCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { - if (!Array.isArray(message.annotation)) - return "annotation: array expected"; - for (var i = 0; i < message.annotation.length; ++i) { - var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); - if (error) - return "annotation." + error; - } - } - return null; - }; - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo(); - if (object.annotation) { - if (!Array.isArray(object.annotation)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); - message.annotation = []; - for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GeneratedCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); - } - return object; - }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - * @returns {Object.} JSON object - */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; - }; - - GeneratedCodeInfo.Annotation = (function() { - - /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end - * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic - */ - - /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation - * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - */ - function Annotation(properties) { - this.path = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; - - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; - - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; - - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; - - /** - * Annotation semantic. - * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.semantic = 0; - - /** - * Creates a new Annotation instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance - */ - Annotation.create = function create(properties) { - return new Annotation(properties); - }; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); - if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); - return writer; - }; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - message.sourceFile = reader.string(); - break; - } - case 3: { - message.begin = reader.int32(); - break; - } - case 4: { - message.end = reader.int32(); - break; - } - case 5: { - message.semantic = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Annotation message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Annotation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - if (!$util.isString(message.sourceFile)) - return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) - if (!$util.isInteger(message.begin)) - return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.semantic != null && message.hasOwnProperty("semantic")) - switch (message.semantic) { - default: - return "semantic: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - switch (object.semantic) { - default: - if (typeof object.semantic === "number") { - message.semantic = object.semantic; - break; - } - break; - case "NONE": - case 0: - message.semantic = 0; - break; - case "SET": - case 1: - message.semantic = 1; - break; - case "ALIAS": - case 2: - message.semantic = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - object.semantic = options.enums === String ? "NONE" : 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; - return object; - }; - - /** - * Converts this Annotation to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - * @returns {Object.} JSON object - */ - Annotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Annotation - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; - }; - - /** - * Semantic enum. - * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} SET=1 SET value - * @property {number} ALIAS=2 ALIAS value - */ - Annotation.Semantic = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "SET"] = 1; - values[valuesById[2] = "ALIAS"] = 2; - return values; - })(); - - return Annotation; - })(); - - return GeneratedCodeInfo; - })(); - - protobuf.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Duration - * @function getTypeUrl - * @memberof google.protobuf.Duration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Duration"; - }; - - return Duration; - })(); - - protobuf.Timestamp = (function() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ - - /** - * Constructs a new Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp - * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - */ - function Timestamp(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; - - /** - * Creates a new Timestamp instance using the specified properties. - * @function create - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance - */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); - }; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Timestamp message. - * @function verify - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Timestamp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp - */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) - return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.Timestamp} message Timestamp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Timestamp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Timestamp to JSON. - * @function toJSON - * @memberof google.protobuf.Timestamp - * @instance - * @returns {Object.} JSON object - */ - Timestamp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Timestamp - * @function getTypeUrl - * @memberof google.protobuf.Timestamp - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Timestamp"; - }; - - return Timestamp; - })(); - - protobuf.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/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/protos.json b/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/protos.json deleted file mode 100644 index 82e0997c2b7..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/protos/protos.json +++ /dev/null @@ -1,4750 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "cloud": { - "nested": { - "datacatalog": { - "nested": { - "v1beta1": { - "options": { - "csharp_namespace": "Google.Cloud.DataCatalog.V1Beta1", - "go_package": "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb", - "java_multiple_files": true, - "java_package": "com.google.cloud.datacatalog.v1beta1", - "php_namespace": "Google\\Cloud\\DataCatalog\\V1beta1", - "ruby_package": "Google::Cloud::DataCatalog::V1beta1", - "(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}", - "java_outer_classname": "PolicyTagManagerSerializationProto" - }, - "nested": { - "IntegratedSystem": { - "values": { - "INTEGRATED_SYSTEM_UNSPECIFIED": 0, - "BIGQUERY": 1, - "CLOUD_PUBSUB": 2 - } - }, - "ManagingSystem": { - "values": { - "MANAGING_SYSTEM_UNSPECIFIED": 0, - "MANAGING_SYSTEM_DATAPLEX": 1, - "MANAGING_SYSTEM_OTHER": 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" - } - ] - }, - "RenameTagTemplateFieldEnumValue": { - "requestType": "RenameTagTemplateFieldEnumValueRequest", - "responseType": "TagTemplateField", - "options": { - "(google.api.http).post": "/v1beta1/{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": "/v1beta1/{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": "/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)": "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" - } - } - } - } - } - }, - "SearchCatalogResponse": { - "fields": { - "results": { - "rule": "repeated", - "type": "SearchCatalogResult", - "id": 1 - }, - "totalSize": { - "type": "int32", - "id": 2 - }, - "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" - ] - } - }, - "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.field_behavior)": "IDENTIFIER", - "(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" - } - }, - "usageSignal": { - "type": "UsageSignal", - "id": 13, - "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, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "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 - } - } - }, - "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 - }, - "modifyTime": { - "type": "google.protobuf.Timestamp", - "id": 7 - } - } - }, - "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" - } - } - } - }, - "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, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "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, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "displayName": { - "type": "string", - "id": 2 - }, - "fields": { - "keyType": "string", - "type": "TagTemplateField", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "dataplexTransferStatus": { - "type": "DataplexTransferStatus", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "DataplexTransferStatus": { - "valuesOptions": { - "MIGRATED": { - "deprecated": true - } - }, - "values": { - "DATAPLEX_TRANSFER_STATUS_UNSPECIFIED": 0, - "MIGRATED": 1 - } - } - } - }, - "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 - } - }, - "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 - } - } - }, - "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)": "IDENTIFIER" - } - }, - "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" - } - }, - "service": { - "type": "Service", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "PolicyType": { - "values": { - "POLICY_TYPE_UNSPECIFIED": 0, - "FINE_GRAINED_ACCESS_CONTROL": 1 - } - }, - "Service": { - "fields": { - "name": { - "type": "ManagingSystem", - "id": 1 - }, - "identity": { - "type": "string", - "id": 2 - } - } - } - } - }, - "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)": "IDENTIFIER" - } - }, - "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 - }, - "filter": { - "type": "string", - "id": 4 - } - } - }, - "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 - }, - "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 - } - } - }, - "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": { - "http": { - "type": "HttpRule", - "id": 72295728, - "extend": "google.protobuf.MethodOptions" - }, - "Http": { - "fields": { - "rules": { - "rule": "repeated", - "type": "HttpRule", - "id": 1 - }, - "fullyDecodeReservedExpansion": { - "type": "bool", - "id": 2 - } - } - }, - "HttpRule": { - "oneofs": { - "pattern": { - "oneof": [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "get": { - "type": "string", - "id": 2 - }, - "put": { - "type": "string", - "id": 3 - }, - "post": { - "type": "string", - "id": 4 - }, - "delete": { - "type": "string", - "id": 5 - }, - "patch": { - "type": "string", - "id": 6 - }, - "custom": { - "type": "CustomHttpPattern", - "id": 8 - }, - "body": { - "type": "string", - "id": 7 - }, - "responseBody": { - "type": "string", - "id": 12 - }, - "additionalBindings": { - "rule": "repeated", - "type": "HttpRule", - "id": 11 - } - } - }, - "CustomHttpPattern": { - "fields": { - "kind": { - "type": "string", - "id": 1 - }, - "path": { - "type": "string", - "id": 2 - } - } - }, - "methodSignature": { - "rule": "repeated", - "type": "string", - "id": 1051, - "extend": "google.protobuf.MethodOptions" - }, - "defaultHost": { - "type": "string", - "id": 1049, - "extend": "google.protobuf.ServiceOptions" - }, - "oauthScopes": { - "type": "string", - "id": 1050, - "extend": "google.protobuf.ServiceOptions" - }, - "apiVersion": { - "type": "string", - "id": 525000001, - "extend": "google.protobuf.ServiceOptions" - }, - "CommonLanguageSettings": { - "fields": { - "referenceDocsUri": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "destinations": { - "rule": "repeated", - "type": "ClientLibraryDestination", - "id": 2 - } - } - }, - "ClientLibrarySettings": { - "fields": { - "version": { - "type": "string", - "id": 1 - }, - "launchStage": { - "type": "LaunchStage", - "id": 2 - }, - "restNumericEnums": { - "type": "bool", - "id": 3 - }, - "javaSettings": { - "type": "JavaSettings", - "id": 21 - }, - "cppSettings": { - "type": "CppSettings", - "id": 22 - }, - "phpSettings": { - "type": "PhpSettings", - "id": 23 - }, - "pythonSettings": { - "type": "PythonSettings", - "id": 24 - }, - "nodeSettings": { - "type": "NodeSettings", - "id": 25 - }, - "dotnetSettings": { - "type": "DotnetSettings", - "id": 26 - }, - "rubySettings": { - "type": "RubySettings", - "id": 27 - }, - "goSettings": { - "type": "GoSettings", - "id": 28 - } - } - }, - "Publishing": { - "fields": { - "methodSettings": { - "rule": "repeated", - "type": "MethodSettings", - "id": 2 - }, - "newIssueUri": { - "type": "string", - "id": 101 - }, - "documentationUri": { - "type": "string", - "id": 102 - }, - "apiShortName": { - "type": "string", - "id": 103 - }, - "githubLabel": { - "type": "string", - "id": 104 - }, - "codeownerGithubTeams": { - "rule": "repeated", - "type": "string", - "id": 105 - }, - "docTagPrefix": { - "type": "string", - "id": 106 - }, - "organization": { - "type": "ClientLibraryOrganization", - "id": 107 - }, - "librarySettings": { - "rule": "repeated", - "type": "ClientLibrarySettings", - "id": 109 - }, - "protoReferenceDocumentationUri": { - "type": "string", - "id": 110 - }, - "restReferenceDocumentationUri": { - "type": "string", - "id": 111 - } - } - }, - "JavaSettings": { - "fields": { - "libraryPackage": { - "type": "string", - "id": 1 - }, - "serviceClassNames": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "common": { - "type": "CommonLanguageSettings", - "id": 3 - } - } - }, - "CppSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PhpSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PythonSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "NodeSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "DotnetSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - }, - "renamedServices": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "renamedResources": { - "keyType": "string", - "type": "string", - "id": 3 - }, - "ignoredResources": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "forcedNamespaceAliases": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "handwrittenSignatures": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - }, - "RubySettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "GoSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "MethodSettings": { - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "longRunning": { - "type": "LongRunning", - "id": 2 - }, - "autoPopulatedFields": { - "rule": "repeated", - "type": "string", - "id": 3 - } - }, - "nested": { - "LongRunning": { - "fields": { - "initialPollDelay": { - "type": "google.protobuf.Duration", - "id": 1 - }, - "pollDelayMultiplier": { - "type": "float", - "id": 2 - }, - "maxPollDelay": { - "type": "google.protobuf.Duration", - "id": 3 - }, - "totalPollTimeout": { - "type": "google.protobuf.Duration", - "id": 4 - } - } - } - } - }, - "ClientLibraryOrganization": { - "values": { - "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, - "CLOUD": 1, - "ADS": 2, - "PHOTOS": 3, - "STREET_VIEW": 4, - "SHOPPING": 5, - "GEO": 6, - "GENERATIVE_AI": 7 - } - }, - "ClientLibraryDestination": { - "values": { - "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, - "GITHUB": 10, - "PACKAGE_MANAGER": 20 - } - }, - "LaunchStage": { - "values": { - "LAUNCH_STAGE_UNSPECIFIED": 0, - "UNIMPLEMENTED": 6, - "PRELAUNCH": 7, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5 - } - }, - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions", - "options": { - "packed": false - } - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7, - "IDENTIFIER": 8 - } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - }, - "style": { - "rule": "repeated", - "type": "Style", - "id": 10 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - }, - "Style": { - "values": { - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } - } - } - }, - "protobuf": { - "options": { - "go_package": "google.golang.org/protobuf/types/descriptorpb", - "java_package": "com.google.protobuf", - "java_outer_classname": "DescriptorProtos", - "csharp_namespace": "Google.Protobuf.Reflection", - "objc_class_prefix": "GPB", - "cc_enable_arenas": true, - "optimize_for": "SPEED" - }, - "nested": { - "FileDescriptorSet": { - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - } - }, - "Edition": { - "values": { - "EDITION_UNKNOWN": 0, - "EDITION_PROTO2": 998, - "EDITION_PROTO3": 999, - "EDITION_2023": 1000, - "EDITION_2024": 1001, - "EDITION_1_TEST_ONLY": 1, - "EDITION_2_TEST_ONLY": 2, - "EDITION_99997_TEST_ONLY": 99997, - "EDITION_99998_TEST_ONLY": 99998, - "EDITION_99999_TEST_ONLY": 99999, - "EDITION_MAX": 2147483647 - } - }, - "FileDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "package": { - "type": "string", - "id": 2 - }, - "dependency": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "publicDependency": { - "rule": "repeated", - "type": "int32", - "id": 10, - "options": { - "packed": false - } - }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11, - "options": { - "packed": false - } - }, - "messageType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 4 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 5 - }, - "service": { - "rule": "repeated", - "type": "ServiceDescriptorProto", - "id": 6 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 7 - }, - "options": { - "type": "FileOptions", - "id": 8 - }, - "sourceCodeInfo": { - "type": "SourceCodeInfo", - "id": 9 - }, - "syntax": { - "type": "string", - "id": 12 - }, - "edition": { - "type": "Edition", - "id": 14 - } - } - }, - "DescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "field": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 2 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 6 - }, - "nestedType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 3 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 4 - }, - "extensionRange": { - "rule": "repeated", - "type": "ExtensionRange", - "id": 5 - }, - "oneofDecl": { - "rule": "repeated", - "type": "OneofDescriptorProto", - "id": 8 - }, - "options": { - "type": "MessageOptions", - "id": 7 - }, - "reservedRange": { - "rule": "repeated", - "type": "ReservedRange", - "id": 9 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 10 - } - }, - "nested": { - "ExtensionRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "ExtensionRangeOptions", - "id": 3 - } - } - }, - "ReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "ExtensionRangeOptions": { - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - }, - "declaration": { - "rule": "repeated", - "type": "Declaration", - "id": 2, - "options": { - "retention": "RETENTION_SOURCE" - } - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "verification": { - "type": "VerificationState", - "id": 3, - "options": { - "default": "UNVERIFIED", - "retention": "RETENTION_SOURCE" - } - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "Declaration": { - "fields": { - "number": { - "type": "int32", - "id": 1 - }, - "fullName": { - "type": "string", - "id": 2 - }, - "type": { - "type": "string", - "id": 3 - }, - "reserved": { - "type": "bool", - "id": 5 - }, - "repeated": { - "type": "bool", - "id": 6 - } - }, - "reserved": [ - [ - 4, - 4 - ] - ] - }, - "VerificationState": { - "values": { - "DECLARATION": 0, - "UNVERIFIED": 1 - } - } - } - }, - "FieldDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 3 - }, - "label": { - "type": "Label", - "id": 4 - }, - "type": { - "type": "Type", - "id": 5 - }, - "typeName": { - "type": "string", - "id": 6 - }, - "extendee": { - "type": "string", - "id": 2 - }, - "defaultValue": { - "type": "string", - "id": 7 - }, - "oneofIndex": { - "type": "int32", - "id": 9 - }, - "jsonName": { - "type": "string", - "id": 10 - }, - "options": { - "type": "FieldOptions", - "id": 8 - }, - "proto3Optional": { - "type": "bool", - "id": 17 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18 - } - }, - "Label": { - "values": { - "LABEL_OPTIONAL": 1, - "LABEL_REPEATED": 3, - "LABEL_REQUIRED": 2 - } - } - } - }, - "OneofDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "value": { - "rule": "repeated", - "type": "EnumValueDescriptorProto", - "id": 2 - }, - "options": { - "type": "EnumOptions", - "id": 3 - }, - "reservedRange": { - "rule": "repeated", - "type": "EnumReservedRange", - "id": 4 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "EnumReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "EnumValueDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 - }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - } - }, - "MethodDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "inputType": { - "type": "string", - "id": 2 - }, - "outputType": { - "type": "string", - "id": 3 - }, - "options": { - "type": "MethodOptions", - "id": 4 - }, - "clientStreaming": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "serverStreaming": { - "type": "bool", - "id": 6, - "options": { - "default": false - } - } - } - }, - "FileOptions": { - "fields": { - "javaPackage": { - "type": "string", - "id": 1 - }, - "javaOuterClassname": { - "type": "string", - "id": 8 - }, - "javaMultipleFiles": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "javaGenerateEqualsAndHash": { - "type": "bool", - "id": 20, - "options": { - "deprecated": true - } - }, - "javaStringCheckUtf8": { - "type": "bool", - "id": 27, - "options": { - "default": false - } - }, - "optimizeFor": { - "type": "OptimizeMode", - "id": 9, - "options": { - "default": "SPEED" - } - }, - "goPackage": { - "type": "string", - "id": 11 - }, - "ccGenericServices": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "javaGenericServices": { - "type": "bool", - "id": 17, - "options": { - "default": false - } - }, - "pyGenericServices": { - "type": "bool", - "id": 18, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 23, - "options": { - "default": false - } - }, - "ccEnableArenas": { - "type": "bool", - "id": 31, - "options": { - "default": true - } - }, - "objcClassPrefix": { - "type": "string", - "id": 36 - }, - "csharpNamespace": { - "type": "string", - "id": 37 - }, - "swiftPrefix": { - "type": "string", - "id": 39 - }, - "phpClassPrefix": { - "type": "string", - "id": 40 - }, - "phpNamespace": { - "type": "string", - "id": 41 - }, - "phpMetadataNamespace": { - "type": "string", - "id": 44 - }, - "rubyPackage": { - "type": "string", - "id": 45 - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 42, - 42 - ], - [ - 38, - 38 - ] - ], - "nested": { - "OptimizeMode": { - "values": { - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3 - } - } - } - }, - "MessageOptions": { - "fields": { - "messageSetWireFormat": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "noStandardDescriptorAccessor": { - "type": "bool", - "id": 2, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "mapEntry": { - "type": "bool", - "id": 7 - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 11, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 12 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 5, - 5 - ], - [ - 6, - 6 - ], - [ - 8, - 8 - ], - [ - 9, - 9 - ] - ] - }, - "FieldOptions": { - "fields": { - "ctype": { - "type": "CType", - "id": 1, - "options": { - "default": "STRING" - } - }, - "packed": { - "type": "bool", - "id": 2 - }, - "jstype": { - "type": "JSType", - "id": 6, - "options": { - "default": "JS_NORMAL" - } - }, - "lazy": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "unverifiedLazy": { - "type": "bool", - "id": 15, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "weak": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "debugRedact": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "retention": { - "type": "OptionRetention", - "id": 17 - }, - "targets": { - "rule": "repeated", - "type": "OptionTargetType", - "id": 19, - "options": { - "packed": false - } - }, - "editionDefaults": { - "rule": "repeated", - "type": "EditionDefault", - "id": 20 - }, - "features": { - "type": "FeatureSet", - "id": 21 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 18, - 18 - ] - ], - "nested": { - "CType": { - "values": { - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2 - } - }, - "JSType": { - "values": { - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2 - } - }, - "OptionRetention": { - "values": { - "RETENTION_UNKNOWN": 0, - "RETENTION_RUNTIME": 1, - "RETENTION_SOURCE": 2 - } - }, - "OptionTargetType": { - "values": { - "TARGET_TYPE_UNKNOWN": 0, - "TARGET_TYPE_FILE": 1, - "TARGET_TYPE_EXTENSION_RANGE": 2, - "TARGET_TYPE_MESSAGE": 3, - "TARGET_TYPE_FIELD": 4, - "TARGET_TYPE_ONEOF": 5, - "TARGET_TYPE_ENUM": 6, - "TARGET_TYPE_ENUM_ENTRY": 7, - "TARGET_TYPE_SERVICE": 8, - "TARGET_TYPE_METHOD": 9 - } - }, - "EditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "value": { - "type": "string", - "id": 2 - } - } - } - } - }, - "OneofOptions": { - "fields": { - "features": { - "type": "FeatureSet", - "id": 1 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "EnumOptions": { - "fields": { - "allowAlias": { - "type": "bool", - "id": 2 - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 6, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 7 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 5, - 5 - ] - ] - }, - "EnumValueOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "features": { - "type": "FeatureSet", - "id": 2 - }, - "debugRedact": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "ServiceOptions": { - "fields": { - "features": { - "type": "FeatureSet", - "id": 34 - }, - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "MethodOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "idempotencyLevel": { - "type": "IdempotencyLevel", - "id": 34, - "options": { - "default": "IDEMPOTENCY_UNKNOWN" - } - }, - "features": { - "type": "FeatureSet", - "id": 35 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "IdempotencyLevel": { - "values": { - "IDEMPOTENCY_UNKNOWN": 0, - "NO_SIDE_EFFECTS": 1, - "IDEMPOTENT": 2 - } - } - } - }, - "UninterpretedOption": { - "fields": { - "name": { - "rule": "repeated", - "type": "NamePart", - "id": 2 - }, - "identifierValue": { - "type": "string", - "id": 3 - }, - "positiveIntValue": { - "type": "uint64", - "id": 4 - }, - "negativeIntValue": { - "type": "int64", - "id": 5 - }, - "doubleValue": { - "type": "double", - "id": 6 - }, - "stringValue": { - "type": "bytes", - "id": 7 - }, - "aggregateValue": { - "type": "string", - "id": 8 - } - }, - "nested": { - "NamePart": { - "fields": { - "namePart": { - "rule": "required", - "type": "string", - "id": 1 - }, - "isExtension": { - "rule": "required", - "type": "bool", - "id": 2 - } - } - } - } - }, - "FeatureSet": { - "fields": { - "fieldPresence": { - "type": "FieldPresence", - "id": 1, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_2023", - "edition_defaults.value": "EXPLICIT" - } - }, - "enumType": { - "type": "EnumType", - "id": 2, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "OPEN" - } - }, - "repeatedFieldEncoding": { - "type": "RepeatedFieldEncoding", - "id": 3, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "PACKED" - } - }, - "utf8Validation": { - "type": "Utf8Validation", - "id": 4, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "VERIFY" - } - }, - "messageEncoding": { - "type": "MessageEncoding", - "id": 5, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", - "edition_defaults.value": "LENGTH_PREFIXED" - } - }, - "jsonFormat": { - "type": "JsonFormat", - "id": 6, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "ALLOW" - } - } - }, - "extensions": [ - [ - 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 - ], - [ - 9995, - 9999 - ], - [ - 10000, - 10000 - ] - ], - "reserved": [ - [ - 999, - 999 - ] - ], - "nested": { - "FieldPresence": { - "values": { - "FIELD_PRESENCE_UNKNOWN": 0, - "EXPLICIT": 1, - "IMPLICIT": 2, - "LEGACY_REQUIRED": 3 - } - }, - "EnumType": { - "values": { - "ENUM_TYPE_UNKNOWN": 0, - "OPEN": 1, - "CLOSED": 2 - } - }, - "RepeatedFieldEncoding": { - "values": { - "REPEATED_FIELD_ENCODING_UNKNOWN": 0, - "PACKED": 1, - "EXPANDED": 2 - } - }, - "Utf8Validation": { - "values": { - "UTF8_VALIDATION_UNKNOWN": 0, - "VERIFY": 2, - "NONE": 3 - } - }, - "MessageEncoding": { - "values": { - "MESSAGE_ENCODING_UNKNOWN": 0, - "LENGTH_PREFIXED": 1, - "DELIMITED": 2 - } - }, - "JsonFormat": { - "values": { - "JSON_FORMAT_UNKNOWN": 0, - "ALLOW": 1, - "LEGACY_BEST_EFFORT": 2 - } - } - } - }, - "FeatureSetDefaults": { - "fields": { - "defaults": { - "rule": "repeated", - "type": "FeatureSetEditionDefault", - "id": 1 - }, - "minimumEdition": { - "type": "Edition", - "id": 4 - }, - "maximumEdition": { - "type": "Edition", - "id": 5 - } - }, - "nested": { - "FeatureSetEditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "features": { - "type": "FeatureSet", - "id": 2 - } - } - } - } - }, - "SourceCodeInfo": { - "fields": { - "location": { - "rule": "repeated", - "type": "Location", - "id": 1 - } - }, - "nested": { - "Location": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "span": { - "rule": "repeated", - "type": "int32", - "id": 2 - }, - "leadingComments": { - "type": "string", - "id": 3 - }, - "trailingComments": { - "type": "string", - "id": 4 - }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - } - } - }, - "GeneratedCodeInfo": { - "fields": { - "annotation": { - "rule": "repeated", - "type": "Annotation", - "id": 1 - } - }, - "nested": { - "Annotation": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "sourceFile": { - "type": "string", - "id": 2 - }, - "begin": { - "type": "int32", - "id": 3 - }, - "end": { - "type": "int32", - "id": 4 - }, - "semantic": { - "type": "Semantic", - "id": 5 - } - }, - "nested": { - "Semantic": { - "values": { - "NONE": 0, - "SET": 1, - "ALIAS": 2 - } - } - } - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "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": "cloud.google.com/go/iam/apiv1/iampb;iampb", - "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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_entry.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_entry.js deleted file mode 100644 index c650a5f065b..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_entry.js +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_entry_group.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_entry_group.js deleted file mode 100644 index 9607f0deaea..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_entry_group.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_tag.js deleted file mode 100644 index ca8b5d7ffe3..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_tag.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_tag_template.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_tag_template.js deleted file mode 100644 index c1228c483ea..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_tag_template.js +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_tag_template_field.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_tag_template_field.js deleted file mode 100644 index af342a92959..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.create_tag_template_field.js +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_entry.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_entry.js deleted file mode 100644 index 0775e3d7a75..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_entry.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_entry_group.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_entry_group.js deleted file mode 100644 index 30b89cb6ab6..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_entry_group.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_tag.js deleted file mode 100644 index 5159affd655..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_tag.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_tag_template.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_tag_template.js deleted file mode 100644 index 9ac0024b35e..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_tag_template.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_tag_template_field.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_tag_template_field.js deleted file mode 100644 index 4c01eca2607..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.delete_tag_template_field.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_entry.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_entry.js deleted file mode 100644 index 3ce1b1a3a2d..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_entry.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_entry_group.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_entry_group.js deleted file mode 100644 index d97a561feac..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_entry_group.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_iam_policy.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_iam_policy.js deleted file mode 100644 index e1e85568589..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_iam_policy.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_tag_template.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_tag_template.js deleted file mode 100644 index f877efc7b97..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.get_tag_template.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.list_entries.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.list_entries.js deleted file mode 100644 index fa7c1919aa5..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.list_entries.js +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 = 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.list_entry_groups.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.list_entry_groups.js deleted file mode 100644 index b42b99d7376..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.list_entry_groups.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 = 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.list_tags.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.list_tags.js deleted file mode 100644 index e855345fcc1..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.list_tags.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 = 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.lookup_entry.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.lookup_entry.js deleted file mode 100644 index e6141fe9c96..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.lookup_entry.js +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 should 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.rename_tag_template_field.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.rename_tag_template_field.js deleted file mode 100644 index 338edd31bf9..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.rename_tag_template_field.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.rename_tag_template_field_enum_value.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.rename_tag_template_field_enum_value.js deleted file mode 100644 index 5c137b55e76..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.rename_tag_template_field_enum_value.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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_v1beta1_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. Example: - * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name} - */ - // 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').v1beta1; - - // 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_v1beta1_generated_DataCatalog_RenameTagTemplateFieldEnumValue_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.search_catalog.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.search_catalog.js deleted file mode 100644 index 2548878b3e0..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.search_catalog.js +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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_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 = {} - /** - * Optional. The query string in search query syntax. An empty query string - * will result in all data assets (in the specified scope) that the user has - * access to. 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 - * * `default` that can only be descending - * 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, - }; - - // Run request - const iterable = 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.set_iam_policy.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.set_iam_policy.js deleted file mode 100644 index c6ecac8ae00..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.set_iam_policy.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.test_iam_permissions.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.test_iam_permissions.js deleted file mode 100644 index cab032a6a1e..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.test_iam_permissions.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 = ['abc','def'] - - // 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_entry.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_entry.js deleted file mode 100644 index 7b21df8f4e2..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_entry.js +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 = {} - /** - * 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. - * 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_entry_group.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_entry_group.js deleted file mode 100644 index b1eb06086e4..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_entry_group.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 = {} - /** - * 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').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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_tag.js deleted file mode 100644 index 99e5cd81f42..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_tag.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 = {} - /** - * Note: Currently, this parameter can only take `"fields"` as value. - * 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').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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_tag_template.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_tag_template.js deleted file mode 100644 index 072e439f100..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_tag_template.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 = {} - /** - * Names of fields whose values to overwrite on a tag template. Currently, - * only `display_name` can be overwritten. - * 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').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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_tag_template_field.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_tag_template_field.js deleted file mode 100644 index 7fdb67bfed3..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/data_catalog.update_tag_template_field.js +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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. 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').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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.create_policy_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.create_policy_tag.js deleted file mode 100644 index 577306dd22c..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.create_policy_tag.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.create_taxonomy.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.create_taxonomy.js deleted file mode 100644 index 0f32ff0c27d..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.create_taxonomy.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.delete_policy_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.delete_policy_tag.js deleted file mode 100644 index 97c2bd93afd..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.delete_policy_tag.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.delete_taxonomy.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.delete_taxonomy.js deleted file mode 100644 index ba621996403..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.delete_taxonomy.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.get_iam_policy.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.get_iam_policy.js deleted file mode 100644 index 1e35319820d..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.get_iam_policy.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.get_policy_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.get_policy_tag.js deleted file mode 100644 index 392dd2ee393..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.get_policy_tag.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.get_taxonomy.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.get_taxonomy.js deleted file mode 100644 index 46696656f3a..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.get_taxonomy.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.list_policy_tags.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.list_policy_tags.js deleted file mode 100644 index f8c815aa3b0..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.list_policy_tags.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 = 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.list_taxonomies.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.list_taxonomies.js deleted file mode 100644 index 2455e4e2810..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.list_taxonomies.js +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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' - /** - * Supported field for filter is 'service' and value is 'dataplex'. - * Eg: service=dataplex. - */ - // const filter = '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 = 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.set_iam_policy.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.set_iam_policy.js deleted file mode 100644 index 953c675deab..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.set_iam_policy.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.test_iam_permissions.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.test_iam_permissions.js deleted file mode 100644 index 54e71429d31..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.test_iam_permissions.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 = ['abc','def'] - - // 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.update_policy_tag.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.update_policy_tag.js deleted file mode 100644 index 65268b27ccc..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.update_policy_tag.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.update_taxonomy.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.update_taxonomy.js deleted file mode 100644 index 36c3177c91a..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager.update_taxonomy.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager_serialization.export_taxonomies.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager_serialization.export_taxonomies.js deleted file mode 100644 index 591a96d88cd..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager_serialization.export_taxonomies.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 = ['abc','def'] - /** - * 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager_serialization.import_taxonomies.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager_serialization.import_taxonomies.js deleted file mode 100644 index aa16e1e8222..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/policy_tag_manager_serialization.import_taxonomies.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 imported taxonomies will belong - * to. - */ - // const parent = 'abc123' - /** - * Inline source used for taxonomies to be imported. - */ - // 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.datacatalog.v1beta1.json b/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.datacatalog.v1beta1.json deleted file mode 100644 index 5b339ed9fca..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.datacatalog.v1beta1.json +++ /dev/null @@ -1,1947 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-datacatalog", - "version": "0.1.0", - "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 subsequently 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": 95, - "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": 60, - "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": 77, - "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": 61, - "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": 75, - "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": 60, - "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_RenameTagTemplateFieldEnumValue_async", - "title": "DataCatalog renameTagTemplateFieldEnumValue Sample", - "origin": "API_DEFINITION", - "description": " Renames an enum value in a tag template. The enum values have to be unique within one enum field. Thus, an enum value cannot be renamed with a name used in any other enum value within the same enum field.", - "canonical": true, - "file": "data_catalog.rename_tag_template_field_enum_value.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RenameTagTemplateFieldEnumValue", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.RenameTagTemplateFieldEnumValue", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "new_enum_value_display_name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.TagTemplateField", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "RenameTagTemplateFieldEnumValue", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.RenameTagTemplateFieldEnumValue", - "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": 63, - "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": 62, - "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 tags assigned to an [Entry][google.cloud.datacatalog.v1beta1.Entry]. The [columns][google.cloud.datacatalog.v1beta1.Tag.column] in the response are lowercased.", - "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": 70, - "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" - }, - { - "name": "filter", - "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" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/index.ts b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/index.ts deleted file mode 100644 index bba445a5bbd..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/index.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as v1beta1 from './v1beta1'; -const DataCatalogClient = v1beta1.DataCatalogClient; -type DataCatalogClient = v1beta1.DataCatalogClient; -const PolicyTagManagerClient = v1beta1.PolicyTagManagerClient; -type PolicyTagManagerClient = v1beta1.PolicyTagManagerClient; -const PolicyTagManagerSerializationClient = v1beta1.PolicyTagManagerSerializationClient; -type PolicyTagManagerSerializationClient = v1beta1.PolicyTagManagerSerializationClient; -export {v1beta1, DataCatalogClient, PolicyTagManagerClient, PolicyTagManagerSerializationClient}; -export default {v1beta1, DataCatalogClient, PolicyTagManagerClient, PolicyTagManagerSerializationClient}; -import * as protos from '../protos/protos'; -export {protos} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/data_catalog_client.ts b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/data_catalog_client.ts deleted file mode 100644 index e08cbca6f44..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/data_catalog_client.ts +++ /dev/null @@ -1,3761 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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}; - private _universeDomain: string; - private _servicePath: string; - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - pathTemplates: {[name: string]: gax.PathTemplate}; - 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} [options.fallback] - Use HTTP/1.1 REST mode. - * For more information, please check the - * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you - * need to avoid loading the default gRPC version and want to use the fallback - * HTTP implementation. Load only fallback version and pass it to the constructor: - * ``` - * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC - * const client = new DataCatalogClient({fallback: true}, gax); - * ``` - */ - constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof DataCatalogClient; - if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { - throw new Error('Please set either universe_domain or universeDomain, but not both.'); - } - const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; - this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; - this._servicePath = 'datacatalog.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - 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.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', 'renameTagTemplateFieldEnumValue', '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. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'datacatalog.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'datacatalog.googleapis.com'; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - get apiEndpoint() { - return this._servicePath; - } - - get universeDomain() { - return this._universeDomain; - } - - /** - * The port for this API service. - * @returns {number} The default port for this service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - * @returns {string[]} List of default scopes. - */ - static get scopes() { - return [ - 'https://www.googleapis.com/auth/cloud-platform' - ]; - } - - getProjectId(): Promise; - getProjectId(callback: Callback): void; - /** - * Return the project ID used by this class. - * @returns {Promise} A promise that resolves to string containing the project ID. - */ - getProjectId(callback?: Callback): - Promise|void { - if (callback) { - this.auth.getProjectId(callback); - return; - } - return this.auth.getProjectId(); - } - - // ------------------- - // -- Service calls -- - // ------------------- -/** - * 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 {@link protos.google.cloud.datacatalog.v1beta1.EntryGroup|EntryGroup}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 - * 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 {@link protos.google.cloud.datacatalog.v1beta1.EntryGroup|EntryGroup}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.EntryGroup|EntryGroup}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.Entry|Entry}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 - * 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. - * - * 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 {@link protos.google.cloud.datacatalog.v1beta1.Entry|Entry}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 protos.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 {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.Entry|Entry}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 should 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 {@link protos.google.cloud.datacatalog.v1beta1.Entry|Entry}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.TagTemplate|TagTemplate}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.TagTemplate|TagTemplate}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 - * Names of fields whose values to overwrite on a tag template. Currently, - * only `display_name` can be overwritten. - * - * 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 {@link protos.google.cloud.datacatalog.v1beta1.TagTemplate|TagTemplate}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.TagTemplateField|TagTemplateField}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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. 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 {@link protos.google.cloud.datacatalog.v1beta1.TagTemplateField|TagTemplateField}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.TagTemplateField|TagTemplateField}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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); - } -/** - * Renames an enum value in a tag template. The enum values have to be unique - * within one enum field. Thus, an enum value cannot be renamed with a name - * used in any other enum value within the same enum field. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the enum field value. Example: - * - * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name} - * @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 {@link protos.google.cloud.datacatalog.v1beta1.TagTemplateField|TagTemplateField}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.rename_tag_template_field_enum_value.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_RenameTagTemplateFieldEnumValue_async - */ - renameTagTemplateFieldEnumValue( - request?: protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldEnumValueRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, - protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldEnumValueRequest|undefined, {}|undefined - ]>; - renameTagTemplateFieldEnumValue( - request: protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldEnumValueRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, - protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldEnumValueRequest|null|undefined, - {}|null|undefined>): void; - renameTagTemplateFieldEnumValue( - request: protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldEnumValueRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, - protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldEnumValueRequest|null|undefined, - {}|null|undefined>): void; - renameTagTemplateFieldEnumValue( - request?: protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldEnumValueRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, - protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldEnumValueRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, - protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldEnumValueRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, - protos.google.cloud.datacatalog.v1beta1.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 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 {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 protos.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 {@link protos.google.cloud.datacatalog.v1beta1.Tag|Tag}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 - * Note: Currently, this parameter can only take `"fields"` as value. - * - * 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 {@link protos.google.cloud.datacatalog.v1beta1.Tag|Tag}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.iam.v1.Policy|Policy}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.iam.v1.Policy|Policy}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.iam.v1.TestIamPermissionsResponse|TestIamPermissionsResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 subsequently 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] - * Optional. The query string in search query syntax. An empty query string - * will result in all data assets (in the specified scope) that the user has - * access to. 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 protos.google.cloud.datacatalog.v1beta1.SearchCatalogResponse.next_page_token|SearchCatalogResponse.next_page_token}, - * which indicates that this is a continuation of a prior - * {@link protos.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 - * * `default` that can only be descending - * - * 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 {@link protos.google.cloud.datacatalog.v1beta1.SearchCatalogResult|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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] - * Optional. The query string in search query syntax. An empty query string - * will result in all data assets (in the specified scope) that the user has - * access to. 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 protos.google.cloud.datacatalog.v1beta1.SearchCatalogResponse.next_page_token|SearchCatalogResponse.next_page_token}, - * which indicates that this is a continuation of a prior - * {@link protos.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 - * * `default` that can only be descending - * - * 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 {@link protos.google.cloud.datacatalog.v1beta1.SearchCatalogResult|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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] - * Optional. The query string in search query syntax. An empty query string - * will result in all data assets (in the specified scope) that the user has - * access to. 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 protos.google.cloud.datacatalog.v1beta1.SearchCatalogResponse.next_page_token|SearchCatalogResponse.next_page_token}, - * which indicates that this is a continuation of a prior - * {@link protos.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 - * * `default` that can only be descending - * - * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.datacatalog.v1beta1.SearchCatalogResult|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.EntryGroup|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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 {@link protos.google.cloud.datacatalog.v1beta1.EntryGroup|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.datacatalog.v1beta1.EntryGroup|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.Entry|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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 {@link protos.google.cloud.datacatalog.v1beta1.Entry|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.datacatalog.v1beta1.Entry|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 tags assigned to an {@link protos.google.cloud.datacatalog.v1beta1.Entry|Entry}. - * The {@link protos.google.cloud.datacatalog.v1beta1.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 could be an {@link protos.google.cloud.datacatalog.v1beta1.Entry|Entry} or an - * {@link protos.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 {@link protos.google.cloud.datacatalog.v1beta1.Tag|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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 protos.google.cloud.datacatalog.v1beta1.Entry|Entry} or an - * {@link protos.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 {@link protos.google.cloud.datacatalog.v1beta1.Tag|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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 protos.google.cloud.datacatalog.v1beta1.Entry|Entry} or an - * {@link protos.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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.datacatalog.v1beta1.Tag|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/data_catalog_client_config.json b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/data_catalog_client_config.json deleted file mode 100644 index 302d766c2f4..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/data_catalog_client_config.json +++ /dev/null @@ -1,171 +0,0 @@ -{ - "interfaces": { - "google.cloud.datacatalog.v1beta1.DataCatalog": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "resource_exhausted_internal_unavailable": [ - "RESOURCE_EXHAUSTED", - "INTERNAL", - "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": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "CreateEntryGroup": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "UpdateEntryGroup": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "GetEntryGroup": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "DeleteEntryGroup": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "ListEntryGroups": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "CreateEntry": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "UpdateEntry": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "DeleteEntry": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "GetEntry": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "LookupEntry": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "ListEntries": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "CreateTagTemplate": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "GetTagTemplate": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "UpdateTagTemplate": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "DeleteTagTemplate": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "CreateTagTemplateField": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "UpdateTagTemplateField": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "RenameTagTemplateField": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "RenameTagTemplateFieldEnumValue": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "DeleteTagTemplateField": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "CreateTag": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "UpdateTag": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "DeleteTag": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "ListTags": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_internal_unavailable", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/data_catalog_proto_list.json b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/data_catalog_proto_list.json deleted file mode 100644 index 87fadef68ad..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/data_catalog_proto_list.json +++ /dev/null @@ -1,13 +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", - "../../protos/google/cloud/datacatalog/v1beta1/usage.proto" -] diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/gapic_metadata.json deleted file mode 100644 index 2cbf4fc5833..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/gapic_metadata.json +++ /dev/null @@ -1,505 +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" - ] - }, - "RenameTagTemplateFieldEnumValue": { - "methods": [ - "renameTagTemplateFieldEnumValue" - ] - }, - "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" - ] - }, - "RenameTagTemplateFieldEnumValue": { - "methods": [ - "renameTagTemplateFieldEnumValue" - ] - }, - "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/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/index.ts b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/index.ts deleted file mode 100644 index a6998a86c14..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_client.ts b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_client.ts deleted file mode 100644 index c048bfdf1fa..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_client.ts +++ /dev/null @@ -1,2024 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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}; - private _universeDomain: string; - private _servicePath: string; - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - pathTemplates: {[name: string]: gax.PathTemplate}; - 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} [options.fallback] - Use HTTP/1.1 REST mode. - * For more information, please check the - * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you - * need to avoid loading the default gRPC version and want to use the fallback - * HTTP implementation. Load only fallback version and pass it to the constructor: - * ``` - * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC - * const client = new PolicyTagManagerClient({fallback: true}, gax); - * ``` - */ - constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof PolicyTagManagerClient; - if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { - throw new Error('Please set either universe_domain or universeDomain, but not both.'); - } - const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; - this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; - this._servicePath = 'datacatalog.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - 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. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'datacatalog.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'datacatalog.googleapis.com'; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - get apiEndpoint() { - return this._servicePath; - } - - get universeDomain() { - return this._universeDomain; - } - - /** - * The port for this API service. - * @returns {number} The default port for this service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - * @returns {string[]} List of default scopes. - */ - static get scopes() { - return [ - 'https://www.googleapis.com/auth/cloud-platform' - ]; - } - - getProjectId(): Promise; - getProjectId(callback: Callback): void; - /** - * Return the project ID used by this class. - * @returns {Promise} A promise that resolves to string containing the project ID. - */ - getProjectId(callback?: Callback): - Promise|void { - if (callback) { - this.auth.getProjectId(callback); - return; - } - return this.auth.getProjectId(); - } - - // ------------------- - // -- Service calls -- - // ------------------- -/** - * 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 {@link protos.google.cloud.datacatalog.v1beta1.Taxonomy|Taxonomy}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.Taxonomy|Taxonomy}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.Taxonomy|Taxonomy}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.PolicyTag|PolicyTag}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.PolicyTag|PolicyTag}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.PolicyTag|PolicyTag}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.iam.v1.Policy|Policy}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.iam.v1.Policy|Policy}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.iam.v1.TestIamPermissionsResponse|TestIamPermissionsResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {string} request.filter - * Supported field for filter is 'service' and value is 'dataplex'. - * Eg: service=dataplex. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.datacatalog.v1beta1.Taxonomy|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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 {string} request.filter - * Supported field for filter is 'service' and value is 'dataplex'. - * Eg: service=dataplex. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.datacatalog.v1beta1.Taxonomy|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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 {string} request.filter - * Supported field for filter is 'service' and value is 'dataplex'. - * Eg: service=dataplex. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.datacatalog.v1beta1.Taxonomy|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.PolicyTag|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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 {@link protos.google.cloud.datacatalog.v1beta1.PolicyTag|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.datacatalog.v1beta1.PolicyTag|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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_client_config.json b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_client_config.json deleted file mode 100644 index 3ebe249a141..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_client_config.json +++ /dev/null @@ -1,91 +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": { - "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/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_proto_list.json b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_proto_list.json deleted file mode 100644 index 87fadef68ad..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_proto_list.json +++ /dev/null @@ -1,13 +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", - "../../protos/google/cloud/datacatalog/v1beta1/usage.proto" -] diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_serialization_client.ts b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_serialization_client.ts deleted file mode 100644 index 89d08b067b6..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_serialization_client.ts +++ /dev/null @@ -1,991 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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}; - private _universeDomain: string; - private _servicePath: string; - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - pathTemplates: {[name: string]: gax.PathTemplate}; - 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} [options.fallback] - Use HTTP/1.1 REST mode. - * For more information, please check the - * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you - * need to avoid loading the default gRPC version and want to use the fallback - * HTTP implementation. Load only fallback version and pass it to the constructor: - * ``` - * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC - * const client = new PolicyTagManagerSerializationClient({fallback: true}, gax); - * ``` - */ - constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof PolicyTagManagerSerializationClient; - if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { - throw new Error('Please set either universe_domain or universeDomain, but not both.'); - } - const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; - this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; - this._servicePath = 'datacatalog.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - 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. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'datacatalog.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'datacatalog.googleapis.com'; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - get apiEndpoint() { - return this._servicePath; - } - - get universeDomain() { - return this._universeDomain; - } - - /** - * The port for this API service. - * @returns {number} The default port for this service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - * @returns {string[]} List of default scopes. - */ - static get scopes() { - return [ - 'https://www.googleapis.com/auth/cloud-platform' - ]; - } - - getProjectId(): Promise; - getProjectId(callback: Callback): void; - /** - * Return the project ID used by this class. - * @returns {Promise} A promise that resolves to string containing the project ID. - */ - getProjectId(callback?: Callback): - Promise|void { - if (callback) { - this.auth.getProjectId(callback); - return; - } - return this.auth.getProjectId(); - } - - // ------------------- - // -- Service calls -- - // ------------------- -/** - * 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 imported taxonomies will belong - * to. - * @param {google.cloud.datacatalog.v1beta1.InlineSource} request.inlineSource - * Inline source used for taxonomies to be imported. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse|ImportTaxonomiesResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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 {@link protos.google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse|ExportTaxonomiesResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/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/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_serialization_client_config.json b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_serialization_client_config.json deleted file mode 100644 index 0c5cc695aeb..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_serialization_client_config.json +++ /dev/null @@ -1,36 +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": { - "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/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_serialization_proto_list.json b/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_serialization_proto_list.json deleted file mode 100644 index 87fadef68ad..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/src/v1beta1/policy_tag_manager_serialization_proto_list.json +++ /dev/null @@ -1,13 +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", - "../../protos/google/cloud/datacatalog/v1beta1/usage.proto" -] diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/system-test/fixtures/sample/src/index.js deleted file mode 100644 index 5b474f9796d..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-datacatalog/v1beta1/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index 4c012b3d052..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/system-test/install.ts b/owl-bot-staging/google-cloud-datacatalog/v1beta1/system-test/install.ts deleted file mode 100644 index 2a505d6df0c..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/system-test/install.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import {packNTest} from 'pack-n-play'; -import {readFileSync} from 'fs'; -import {describe, it} from 'mocha'; - -describe('📦 pack-n-play test', () => { - - it('TypeScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'TypeScript user can use the type definitions', - ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() - } - }; - await packNTest(options); - }); - - it('JavaScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'JavaScript user can use the library', - ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() - } - }; - await packNTest(options); - }); - -}); diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/test/gapic_data_catalog_v1beta1.ts b/owl-bot-staging/google-cloud-datacatalog/v1beta1/test/gapic_data_catalog_v1beta1.ts deleted file mode 100644 index 2cdcc30ed25..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/test/gapic_data_catalog_v1beta1.ts +++ /dev/null @@ -1,4241 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 apiEndpoint', () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient(); - const universeDomain = client.universeDomain; - assert.strictEqual(universeDomain, "googleapis.com"); - }); - - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - it('throws DeprecationWarning if static servicePath is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const servicePath = datacatalogModule.v1beta1.DataCatalogClient.servicePath; - assert.strictEqual(servicePath, 'datacatalog.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = datacatalogModule.v1beta1.DataCatalogClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.example.com'); - }); - - if (typeof process === 'object' && 'env' in process) { - describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { - it('sets apiEndpoint from environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new datacatalogModule.v1beta1.DataCatalogClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - - it('value configured in code has priority over environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new datacatalogModule.v1beta1.DataCatalogClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.configured.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - }); - } - it('does not allow setting both universeDomain and universe_domain', () => { - assert.throws(() => { new datacatalogModule.v1beta1.DataCatalogClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - 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('renameTagTemplateFieldEnumValue', () => { - it('invokes renameTagTemplateFieldEnumValue 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.RenameTagTemplateFieldEnumValueRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.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.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.TagTemplateField() - ); - client.innerApiCalls.renameTagTemplateFieldEnumValue = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.renameTagTemplateFieldEnumValue( - 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.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.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datacatalog.v1beta1.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.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datacatalog.v1beta1.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.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('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.v1beta1.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.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/owl-bot-staging/google-cloud-datacatalog/v1beta1/test/gapic_policy_tag_manager_serialization_v1beta1.ts b/owl-bot-staging/google-cloud-datacatalog/v1beta1/test/gapic_policy_tag_manager_serialization_v1beta1.ts deleted file mode 100644 index d4e1d753289..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/test/gapic_policy_tag_manager_serialization_v1beta1.ts +++ /dev/null @@ -1,863 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 apiEndpoint', () => { - const client = new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient(); - const universeDomain = client.universeDomain; - assert.strictEqual(universeDomain, "googleapis.com"); - }); - - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - it('throws DeprecationWarning if static servicePath is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const servicePath = policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient.servicePath; - assert.strictEqual(servicePath, 'datacatalog.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.example.com'); - }); - - if (typeof process === 'object' && 'env' in process) { - describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { - it('sets apiEndpoint from environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - - it('value configured in code has priority over environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.configured.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - }); - } - it('does not allow setting both universeDomain and universe_domain', () => { - assert.throws(() => { new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/test/gapic_policy_tag_manager_v1beta1.ts b/owl-bot-staging/google-cloud-datacatalog/v1beta1/test/gapic_policy_tag_manager_v1beta1.ts deleted file mode 100644 index 5d83086b651..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/test/gapic_policy_tag_manager_v1beta1.ts +++ /dev/null @@ -1,2380 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by 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 apiEndpoint', () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient(); - const universeDomain = client.universeDomain; - assert.strictEqual(universeDomain, "googleapis.com"); - }); - - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - it('throws DeprecationWarning if static servicePath is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const servicePath = policytagmanagerModule.v1beta1.PolicyTagManagerClient.servicePath; - assert.strictEqual(servicePath, 'datacatalog.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = policytagmanagerModule.v1beta1.PolicyTagManagerClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.example.com'); - }); - - if (typeof process === 'object' && 'env' in process) { - describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { - it('sets apiEndpoint from environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - - it('value configured in code has priority over environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.configured.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - }); - } - it('does not allow setting both universeDomain and universe_domain', () => { - assert.throws(() => { new policytagmanagerModule.v1beta1.PolicyTagManagerClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - 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/owl-bot-staging/google-cloud-datacatalog/v1beta1/tsconfig.json b/owl-bot-staging/google-cloud-datacatalog/v1beta1/tsconfig.json deleted file mode 100644 index c78f1c884ef..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "./node_modules/gts/tsconfig-google.json", - "compilerOptions": { - "rootDir": ".", - "outDir": "build", - "resolveJsonModule": true, - "lib": [ - "es2018", - "dom" - ] - }, - "include": [ - "src/*.ts", - "src/**/*.ts", - "test/*.ts", - "test/**/*.ts", - "system-test/*.ts" - ] -} diff --git a/owl-bot-staging/google-cloud-datacatalog/v1beta1/webpack.config.js b/owl-bot-staging/google-cloud-datacatalog/v1beta1/webpack.config.js deleted file mode 100644 index 95cf943fced..00000000000 --- a/owl-bot-staging/google-cloud-datacatalog/v1beta1/webpack.config.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -const path = require('path'); - -module.exports = { - entry: './src/index.ts', - output: { - library: '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', -}; diff --git a/packages/google-cloud-datacatalog/.jsdoc.js b/packages/google-cloud-datacatalog/.jsdoc.js index e2ae4253b75..ac28df7d11a 100644 --- a/packages/google-cloud-datacatalog/.jsdoc.js +++ b/packages/google-cloud-datacatalog/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2024 Google LLC', + copyright: 'Copyright 2025 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/datacatalog', diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.create_entry.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.create_entry.js index 6df34f0684b..4dec286ef3d 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.create_entry.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.create_entry.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.create_entry_group.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.create_entry_group.js index 4b1f21866df..b1909bf3acc 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.create_entry_group.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.create_entry_group.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.create_tag.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.create_tag.js index 69e306597e5..dda7adab166 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.create_tag.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.create_tag.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.create_tag_template.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.create_tag_template.js index efa85541cd8..d1750ae9608 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.create_tag_template.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.create_tag_template.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.create_tag_template_field.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.create_tag_template_field.js index 871f9ef216b..c4b8a1568c5 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.create_tag_template_field.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.create_tag_template_field.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.delete_entry.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.delete_entry.js index 76b0ee76179..3e6123e8d84 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.delete_entry.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.delete_entry.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.delete_entry_group.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.delete_entry_group.js index 5c8ff7589db..6cedee23bf1 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.delete_entry_group.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.delete_entry_group.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.delete_tag.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.delete_tag.js index e6b1c5cf3ee..f600946c02d 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.delete_tag.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.delete_tag.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.delete_tag_template.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.delete_tag_template.js index acebf0a6011..e581d2690f5 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.delete_tag_template.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.delete_tag_template.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.delete_tag_template_field.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.delete_tag_template_field.js index fd6b6882e52..93c07061724 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.delete_tag_template_field.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.delete_tag_template_field.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.get_entry.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.get_entry.js index 870cb7c1dd9..2e796a4120a 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.get_entry.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.get_entry.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.get_entry_group.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.get_entry_group.js index e9cf6d543de..464ac1b5d01 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.get_entry_group.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.get_entry_group.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.get_iam_policy.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.get_iam_policy.js index 6917b40a2e3..d22ebd2d441 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.get_iam_policy.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.get_iam_policy.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.get_tag_template.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.get_tag_template.js index 78d799d812e..9f02313f823 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.get_tag_template.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.get_tag_template.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.import_entries.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.import_entries.js index 10d8235ef4a..cd37504e57e 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.import_entries.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.import_entries.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.list_entries.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.list_entries.js index 14a84cd7883..6c448c00a31 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.list_entries.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.list_entries.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.list_entry_groups.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.list_entry_groups.js index e829715d631..aef01a89525 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.list_entry_groups.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.list_entry_groups.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.list_tags.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.list_tags.js index 32364457607..d2a6dae4fb6 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.list_tags.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.list_tags.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.lookup_entry.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.lookup_entry.js index 16b1b4443b5..9223e4dd7e8 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.lookup_entry.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.lookup_entry.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.modify_entry_contacts.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.modify_entry_contacts.js index 0edc57996f9..6e231d42ebb 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.modify_entry_contacts.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.modify_entry_contacts.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.modify_entry_overview.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.modify_entry_overview.js index 11b7ef1b170..d3f6bbe8032 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.modify_entry_overview.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.modify_entry_overview.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.reconcile_tags.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.reconcile_tags.js index 701ed757eb8..eafaca6a135 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.reconcile_tags.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.reconcile_tags.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.rename_tag_template_field.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.rename_tag_template_field.js index f57ac932167..5ee973520ab 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.rename_tag_template_field.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.rename_tag_template_field.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.rename_tag_template_field_enum_value.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.rename_tag_template_field_enum_value.js index 6700370a90a..bd10fb422f9 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.rename_tag_template_field_enum_value.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.rename_tag_template_field_enum_value.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.retrieve_config.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.retrieve_config.js index aef9749723a..8e1535ef179 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.retrieve_config.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.retrieve_config.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.retrieve_effective_config.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.retrieve_effective_config.js index 1811184d3c5..8481756c5ff 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.retrieve_effective_config.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.retrieve_effective_config.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.search_catalog.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.search_catalog.js index 51d6cb55c1c..5cec31e396e 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.search_catalog.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.search_catalog.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.set_config.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.set_config.js index 87106f2c0a6..c7d5d77dc07 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.set_config.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.set_config.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.set_iam_policy.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.set_iam_policy.js index c96eee79b1a..ecb39caf993 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.set_iam_policy.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.set_iam_policy.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.star_entry.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.star_entry.js index 93009a4eb2e..b5a973b7e18 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.star_entry.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.star_entry.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.test_iam_permissions.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.test_iam_permissions.js index bdf8c46b659..c9460c31f5c 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.test_iam_permissions.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.test_iam_permissions.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.unstar_entry.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.unstar_entry.js index d30c3eb6ad9..bd31f3611d9 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.unstar_entry.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.unstar_entry.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.update_entry.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.update_entry.js index 913b707bf0b..26ad8f60266 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.update_entry.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.update_entry.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.update_entry_group.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.update_entry_group.js index 1a5de67d5d6..3d8bc9eaa84 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.update_entry_group.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.update_entry_group.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.update_tag.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.update_tag.js index 5e555f81a0b..a429ca6fe49 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.update_tag.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.update_tag.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.update_tag_template.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.update_tag_template.js index d9bfb20a86a..0b1ccc785d5 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.update_tag_template.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.update_tag_template.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.update_tag_template_field.js b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.update_tag_template_field.js index b8dbaebc201..b9e18256601 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.update_tag_template_field.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/data_catalog.update_tag_template_field.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.create_policy_tag.js b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.create_policy_tag.js index 756148f4408..7006cd16c8b 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.create_policy_tag.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.create_policy_tag.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.create_taxonomy.js b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.create_taxonomy.js index 77acec4431f..2329f33b645 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.create_taxonomy.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.create_taxonomy.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.delete_policy_tag.js b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.delete_policy_tag.js index bf400f37e0e..c1b2b208653 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.delete_policy_tag.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.delete_policy_tag.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.delete_taxonomy.js b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.delete_taxonomy.js index b87172c64ea..77940dcba83 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.delete_taxonomy.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.delete_taxonomy.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.get_iam_policy.js b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.get_iam_policy.js index f485f3a3590..4c270dc80ae 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.get_iam_policy.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.get_iam_policy.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.get_policy_tag.js b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.get_policy_tag.js index 0bc63960a7e..ac6b9d5ef71 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.get_policy_tag.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.get_policy_tag.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.get_taxonomy.js b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.get_taxonomy.js index 2642028d51c..7ff0a3a8f21 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.get_taxonomy.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.get_taxonomy.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.list_policy_tags.js b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.list_policy_tags.js index 5072b7c7eea..2bf0a7cc4e4 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.list_policy_tags.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.list_policy_tags.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.list_taxonomies.js b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.list_taxonomies.js index 8dfcd274c76..4ca5ec8f119 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.list_taxonomies.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.list_taxonomies.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.set_iam_policy.js b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.set_iam_policy.js index b38a4c74e22..8599b15230c 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.set_iam_policy.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.set_iam_policy.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.test_iam_permissions.js b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.test_iam_permissions.js index 3c60e63620b..742b043644d 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.test_iam_permissions.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.test_iam_permissions.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.update_policy_tag.js b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.update_policy_tag.js index 7d94c0f2e67..aa10b6bceed 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.update_policy_tag.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.update_policy_tag.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.update_taxonomy.js b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.update_taxonomy.js index da539c276f4..5c64aa74a0b 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.update_taxonomy.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager.update_taxonomy.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager_serialization.export_taxonomies.js b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager_serialization.export_taxonomies.js index 4bb4524d4b4..146fdfa4543 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager_serialization.export_taxonomies.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager_serialization.export_taxonomies.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager_serialization.import_taxonomies.js b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager_serialization.import_taxonomies.js index 0255b520aa0..2811178851c 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager_serialization.import_taxonomies.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager_serialization.import_taxonomies.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager_serialization.replace_taxonomy.js b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager_serialization.replace_taxonomy.js index eb44bdbde9e..19e3b2566f8 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager_serialization.replace_taxonomy.js +++ b/packages/google-cloud-datacatalog/samples/generated/v1/policy_tag_manager_serialization.replace_taxonomy.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/src/v1/data_catalog_client.ts b/packages/google-cloud-datacatalog/src/v1/data_catalog_client.ts index 20530d72361..acebbe2ddd9 100644 --- a/packages/google-cloud-datacatalog/src/v1/data_catalog_client.ts +++ b/packages/google-cloud-datacatalog/src/v1/data_catalog_client.ts @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/src/v1/index.ts b/packages/google-cloud-datacatalog/src/v1/index.ts index 94641d09735..a6998a86c14 100644 --- a/packages/google-cloud-datacatalog/src/v1/index.ts +++ b/packages/google-cloud-datacatalog/src/v1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/src/v1/policy_tag_manager_client.ts b/packages/google-cloud-datacatalog/src/v1/policy_tag_manager_client.ts index fc7b25cc0b2..8490e73f257 100644 --- a/packages/google-cloud-datacatalog/src/v1/policy_tag_manager_client.ts +++ b/packages/google-cloud-datacatalog/src/v1/policy_tag_manager_client.ts @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/src/v1/policy_tag_manager_serialization_client.ts b/packages/google-cloud-datacatalog/src/v1/policy_tag_manager_serialization_client.ts index dad716b4fc1..10ff0f8717c 100644 --- a/packages/google-cloud-datacatalog/src/v1/policy_tag_manager_serialization_client.ts +++ b/packages/google-cloud-datacatalog/src/v1/policy_tag_manager_serialization_client.ts @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/system-test/fixtures/sample/src/index.js b/packages/google-cloud-datacatalog/system-test/fixtures/sample/src/index.js index f4ad85239be..feba8299d78 100644 --- a/packages/google-cloud-datacatalog/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-datacatalog/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-datacatalog/system-test/fixtures/sample/src/index.ts index 9bf01ef496b..85933fee5f9 100644 --- a/packages/google-cloud-datacatalog/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-datacatalog/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/system-test/install.ts b/packages/google-cloud-datacatalog/system-test/install.ts index 83b83f332c3..d927b34361d 100644 --- a/packages/google-cloud-datacatalog/system-test/install.ts +++ b/packages/google-cloud-datacatalog/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/test/gapic_data_catalog_v1.ts b/packages/google-cloud-datacatalog/test/gapic_data_catalog_v1.ts index 88f6648ed6a..62df68cd12f 100644 --- a/packages/google-cloud-datacatalog/test/gapic_data_catalog_v1.ts +++ b/packages/google-cloud-datacatalog/test/gapic_data_catalog_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/test/gapic_policy_tag_manager_serialization_v1.ts b/packages/google-cloud-datacatalog/test/gapic_policy_tag_manager_serialization_v1.ts index 6ece6567d25..b6cac7c09bb 100644 --- a/packages/google-cloud-datacatalog/test/gapic_policy_tag_manager_serialization_v1.ts +++ b/packages/google-cloud-datacatalog/test/gapic_policy_tag_manager_serialization_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog/test/gapic_policy_tag_manager_v1.ts b/packages/google-cloud-datacatalog/test/gapic_policy_tag_manager_v1.ts index 8a3be8ffeb8..9c7ecfea4d7 100644 --- a/packages/google-cloud-datacatalog/test/gapic_policy_tag_manager_v1.ts +++ b/packages/google-cloud-datacatalog/test/gapic_policy_tag_manager_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License.